TanStack Markdown is a small, synchronous Markdown parser and renderer built for technical blogs and documentation.
It provides three independently importable paths:
The package has no runtime dependencies. React is a peer dependency used only by @tanstack/markdown/react, and syntax highlighting stays outside the Markdown bundle.
General Markdown processors optimize for broad conformance, plugin ecosystems, or content transformation pipelines. Those are valid goals, but a controlled docs site often needs much less:
TanStack Markdown spends its complexity budget on that path. It deliberately does not implement every CommonMark edge case, MDX evaluation, automatic linkification, or a general asynchronous processing ecosystem.
Current minified browser bundles are 4.6 KB gzip for the parser, 6.4 KB for HTML rendering, and 6.3 KB for the React adapter with React externalized. The generated bundle report is the source of truth.
parseMarkdown returns plain objects and arrays. The result can be serialized, cached, inspected, transformed, and passed to either renderer.
Raw HTML is escaped unless allowHtml is enabled. Executable URL protocols such as javascript: are removed from links and images.
The supported contract is the TanStack docs syntax profile, not full CommonMark or GFM. Compatibility is continuously measured so established behavior cannot regress silently.