Getting Started

Comparison

Comparison

Markdown libraries optimize for different jobs. TanStack Markdown is designed for controlled blog and documentation content where bundle size, deterministic rendering, and HTML/React parity matter more than complete syntax compatibility.

Decision table

ChooseBest fitMain tradeoff
TanStack MarkdownBlogs and docs with a known syntax profile, SSR, React, and strict bundle budgetsDeliberately incomplete CommonMark/GFM coverage and a small extension surface
MarkedA compact general HTML renderer with broad familiar Markdown behaviorNo built-in React AST renderer or docs-specific AST contract
markdown-itMature plugins and configurable parsing rulesA substantially larger core for this measured use case
micromarkStandards-oriented tokenization and extension building blocksLower-level API and more assembly for a complete docs renderer
commonmark.jsApplications that prioritize CommonMark behavior and an inspectable syntax treeLarger bundle and no built-in React renderer
unified / remark / rehypeRich syntax-tree transformations and a broad content-processing ecosystemMore packages, configuration, and runtime surface
markdown-wasmVery fast HTML rendering where a WASM asset is acceptableDifferent deployment model and no built-in React AST renderer

Capability matrix

CapabilityTanStack MarkdownMarkedmarkdown-itmicromarkcommonmark.jsunified stack
HTML renderingBuilt inBuilt inBuilt inBuilt inBuilt inVia rehype
React renderer from the same ASTBuilt inNoNoNoNoEcosystem
Serializable public document ASTBuilt inToken outputToken streamNo syntax treeBuilt inBuilt in
Raw HTML disabled by defaultYesNoYesYesNoPipeline choice
GFM tables, tasks, and strikeFocused built-insBuilt inBuilt in/pluginsExtensionsNoPlugins
Docs callouts, tabs, and code metadataOpt-in built-insPlugins/customPlugins/customCustomCustomPlugins/custom
General plugin ecosystemFocused hooksMatureMatureComposable extensionsSmallExtensive
MDX or JSX evaluationNoNoNoNoNoSeparate MDX stack
Full compatibility as a project goalNoBroad compatibilityBroad compatibilityCommonMarkCommonMarkCommonMark plus plugins

“Configuration,” “plugin,” and “ecosystem” do not imply missing capability. They indicate that the behavior is not the default contract of the compared entry point.

Measured browser size

These repository benchmarks bundle representative browser entry points from pinned dependencies, minify them with esbuild, and compress them. They are reproducible with pnpm run size.

EntryGzipBrotli
@tanstack/markdown/parser4.6 KB4.2 KB
@tanstack/markdown/html6.4 KB5.8 KB
@tanstack/markdown/react6.3 KB5.8 KB
Marked12.5 KB11.5 KB
micromark15.4 KB13.7 KB
markdown-wasm JS + WASM31.3 KB26.4 KB
unified + remark + rehype36.8 KB32.7 KB
commonmark.js48.1 KB39.8 KB
markdown-it52.7 KB44.0 KB

The comparison does not represent equivalent feature sets. It shows the cost of each measured path for this repository’s rendering benchmark. See the generated size report for exact bytes and versions.

Compatibility accounting

TanStack Markdown currently matches 287 of 652 CommonMark 0.31.2 examples after serializer normalization. That 44% figure is an accounting baseline, not a conformance claim or a target to maximize. The project also preserves selected official GFM examples for tables, task lists, and strikethrough.

Use commonmark.js, micromark, or a unified pipeline when exact specification behavior is a requirement. Use TanStack Markdown when your corpus fits the documented profile and the smaller, controlled renderer is the better product tradeoff.

Performance

Across the maintained fixtures, TanStack Markdown is competitive with the JavaScript renderers in the suite, but it is not the fastest result in every fixture. Pre-parsed AST rendering is its cheapest path. The defensible advantage is the combined size, output contract, and focused feature set. See Performance for methodology and current results.