# rsms/markdown-wasm

Very fast Markdown parser and HTML generator implemented in WebAssembly, based on md4c

Repository: https://github.com/rsms/markdown-wasm
Canonical: https://ross.abutalabs.com/products/markdown-wasm
Homepage: https://rsms.me/markdown-wasm/
Language: C
License: MIT
License Family: permissive
Topics: webassembly, wasm, markdown, parser
Last push: 2022-11-22T17:28:20+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2459, "days_push": 1380, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1667, forks 69 (observed 2026-08-28T04:05:19.664663+00:00)

## What it is
markdown-wasm is a very fast Markdown parser and HTML renderer compiled from C (based on md4c) to WebAssembly, compliant with the CommonMark specification. It ships as a zero-dependency ~31 kB gzipped npm package with a simple synchronous parse() API usable in Node.js, browsers, and ES module setups.

## Use cases
- parse markdown source and convert it to HTML in the browser
- convert markdown files to HTML in Node.js
- render user-submitted markdown with embedded HTML disabled for safety
- need a CommonMark-compliant markdown parser that runs anywhere via WebAssembly
- high-throughput markdown-to-HTML conversion where performance matters
- get HTML output as a string or as UTF-8 bytes from markdown input

## When to choose
- You need very fast markdown-to-HTML rendering with a tiny footprint (31 kB gzipped, zero dependencies)
- You want a CommonMark-compliant parser that works identically in Node.js and the browser through WebAssembly
- You prefer WASM's isolated memory and portability, plus a simple synchronous parse() API with optional byte-array output

## When to avoid
- You need markdown extensions beyond CommonMark (e.g., footnotes, math, or syntax-specific flavors) that md4c flags do not cover
- You need an AST or token stream for custom transformations rather than direct HTML output
- You must avoid WebAssembly or need a pure-JavaScript implementation for your environment

## Facets
- artifact type: library
- maturity: stable
- function: parser
- domain: parsers, web-development, developer-tools
- platform: wasm, browser, cross-platform
- tags: markdown, commonmark, md4c, html-rendering, zero-dependency, npm-package, high-performance, nodejs

## Member repositories
- rsms/markdown-wasm (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:19.664663+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:42:53.529577+00:00, confidence not recorded.
  - readme: https://github.com/rsms/markdown-wasm (fetched 2026-08-28T04:05:19.664663+00:00, sha 957ba8a3816c)
  - homepage: https://rsms.me/markdown-wasm/ (fetched 2026-08-29T11:16:11.014000+00:00, sha 9e6978a11876)
- Data as of 2026-08-30T08:39:29.467469+00:00.
