mdream

Parse <html> with half the tokens. Zero-dependency HTML to Markdown for LLMs; fastest in JS and Rust, streaming, runs everywhere.

10kBgzip
37xfaster than Turndown
2xfewer tokens

Protip: use mdream.dev/<url> to instantly get the markdown of any site

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

Up to 37x faster than Turndown (rust vs JS), 5x faster than htmd (Rust). 1.8MB HTML in ~57ms JS / ~5.2ms Rust.

#1 Token Optimizer

Up to 2x fewer tokens than Turndown, node-html-markdown, and html-to-markdown. 70-99% fewer than raw HTML.

Streaming

Memory efficient streaming for large documents and real-time pipelines.

Tiny & Universal

10kB gzip JS core, 60kB with Rust WASM. Zero dependencies. Runs everywhere.