# micromark/micromark

small, safe, and great commonmark (optionally gfm, mdx) compliant markdown parser

Repository: https://github.com/micromark/micromark
Canonical: https://ross.abutalabs.com/products/micromark
Homepage: https://unifiedjs.com
Language: JavaScript
License: MIT
License Family: permissive
Topics: markdown, unified, ast, cst, commonmark, parse, compile, tokenize, render, gfm
Last push: 2025-05-10T18:46:45+00:00

## Health v2 (maintenance only)
Score: 43/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 20, release rhythm 40, longevity 100
- inputs: {"age_days": 2850, "days_push": 480, "days_rel": 552, "gap_med": 0, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2216, forks 87 (observed 2026-08-28T04:06:27.144111+00:00)

## What it is
micromark is a small, safe, 100% CommonMark-compliant markdown parser written in JavaScript, implemented as a state machine that emits concrete tokens with positional info and compiles them to HTML. It supports extensions such as GFM, MDX, directives, frontmatter, and math, and serves as the parsing foundation of the unified/remark ecosystem.

## Use cases
- convert markdown to html in javascript
- parse markdown with a commonmark compliant parser
- add github flavored markdown support to my app
- build a custom markdown extension or syntax plugin
- get token positions from markdown source
- render mdx content safely
- build an ast from markdown for further processing

## When to choose
- you need strict CommonMark (or GFM/MDX) compliance with high safety guarantees
- you want the smallest footprint markdown parser (~14kb)
- you need concrete tokens and positional info for complex markdown tooling
- you are building on the unified/remark ecosystem

## When to avoid
- you need a ready-made AST rather than concrete tokens (use remark/mdast instead)
- you need markdown parsing in a non-JavaScript language
- you want a batteries-included markdown editor or renderer with UI

## Facets
- artifact type: library
- maturity: stable
- function: parser, serialization, developer-tools
- domain: parsers, web-development, documentation, frontend
- platform: browser, cross-platform
- tags: markdown, commonmark, gfm, mdx, state-machine, tokenizer, unified-ecosystem, html-compilation, javascript, nodejs

## Member repositories
- micromark/micromark (main) score 43

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:27.144111+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-30T02:45:57.100802+00:00, confidence not recorded.
  - readme: https://github.com/micromark/micromark (fetched 2026-08-28T04:06:27.144111+00:00, sha 91a7534da1ef)
  - homepage: https://unifiedjs.com (fetched 2026-08-29T10:26:12.468366+00:00, sha 0359e5fdf9c6)
  - site_page: https://unifiedjs.com/explore/release (fetched 2026-08-29T10:26:12.478211+00:00, sha 34c5baf82537)
- Data as of 2026-08-30T08:39:29.467469+00:00.
