A document model you can inspect.
The parser produces a serializable AST instead of hiding content behind an opaque render pipeline.
Turn Markdown into a small, predictable document model.
Parse once, keep the AST serializable, and render matching HTML or React without pulling a content-processing framework into every page.
2.3 ThousandTotal Downloads156Weekly Downloads2GitHub Stars# Ship the docs
One source, two renderers.
- serializable AST
- safe URLs
- React or HTML
```tsx
<Markdown>{source}</Markdown>
```The parser produces a serializable AST instead of hiding content behind an opaque render pipeline.
Raw HTML and executable URLs are handled deliberately, with malformed input tested as a normal case.
Render the same syntax profile on the server or in components without maintaining two interpretations.
Add callouts, tabs, headings, comments, and framework-aware content through focused extensions.
Controlled Markdown for a blog, docs page, or changelog.
A deterministic, serializable tree with stable node shapes.
Only the docs conventions the product actually needs.
Matching HTML or React output with safe defaults.
A short pipeline is easier to reason about, easier to test, and easier to run identically during SSR and in the browser.
TanStack Markdown accepts external syntax highlighting instead of bundling a grammar engine. TanStack Highlight is the small, synchronous companion built for that job.