mdream
Parse <html> with fewer tokens. Zero-dependency HTML to Markdown for LLMs; fastest in JS and Rust, streaming, runs everywhere.
Tools
What is Mdream?
A zero-dependency, LLM-optimized HTML to Markdown converter. Faster and leaner than Turndown, node-html-markdown, and html-to-markdown, with output tuned for token efficiency and readability.
#1 Fastest
33x faster than Turndown on 166kB HTML (0.34ms Rust vs 11.26ms Turndown). Pure JS: 3.26ms.
#1 Token Optimizer
38% fewer o200k_base tokens than Turndown on a real 166kB Wikipedia fixture.
Streaming
Memory efficient streaming for large documents and real-time pipelines.
Tiny & Universal
19.4kB gzip JS core, 81.2kB Rust WASM. Zero dependencies. Runs everywhere.
Packages
Rust NAPI engine + WASM for edge. Includes CLI.
Pure JS engine. Full hook access, zero native deps.
Site-wide crawler to generate llms.txt artifacts
Auto .md generation for Vite sites
Automatic .md and llms.txt for Nuxt sites
GitHub Action for .md and llms.txt from static HTML
Pre-built image with Playwright Chrome for crawling
Native Rust crate with CLI. Zero deps, streaming.
Use via unpkg/jsDelivr with no build step
Community funded
Kept going by the community.
Mdream stays free and open source because developers and teams using it help fund the work.
Become a sponsor