markdown-wasm is a high-performance Markdown parser and HTML renderer implemented in WebAssembly, designed to provide extremely fast and portable Markdown processing across environments such as browsers and Node.js. It is based on the md4c C library, which is known for its compliance with the CommonMark specification and efficient parsing algorithms. By compiling this C-based parser into WebAssembly, markdown-wasm achieves near-native execution speed while maintaining a small footprint and strong sandboxing guarantees. The library exposes a simple API that allows developers to convert Markdown input into HTML output using either strings or binary data, making it flexible for different use cases. Its architecture prioritizes performance and minimalism, avoiding external dependencies and keeping bundle sizes small, which is particularly beneficial for web applications.
Features
- WebAssembly-based Markdown parser with near-native performance
- Based on md4c with compliance to CommonMark specification
- Simple API for converting Markdown to HTML or binary output
- Zero external dependencies with small bundle size
- Supports configurable parsing flags and extensions
- Runs in both browser and Node.js environments