---
title: "Mdream: HTML to Markdown Converter for LLMs"
description: "Free, zero-dependency HTML to Markdown for LLMs. 33x faster than Turndown with 38% fewer tokens. Available for npm, Rust, WASM, and CLI."
canonical_url: "https://mdream.dev/"
meta:
  "og:description": "Ultra-fast HTML to Markdown converter optimized for LLMs. 33x faster than Turndown, 38% fewer tokens. Runs everywhere."
  "og:image": "https://mdream.dev/_og/s/c_Home.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Mdream: Ultra-fast HTML to Markdown for LLMs"
  "twitter:image": "https://mdream.dev/_og/s/c_Home.png"
---

> Index of every page on this site: [llms.txt](https://mdream.dev/llms.txt)

# **mdream **

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

**32.6kB**gzip

**33x**faster than Turndown

**38%**fewer tokens

[GitHub](https://github.com/harlan-zw/mdream) [ npmx](https://npmx.dev/package/mdream)

## Tools

[**llms.txt Explorer**·Browse, validate, and generate llms.txt files.](https://mdream.dev/llms-txt) [**llms.txt Generator**·Crawl any site, generate a spec-compliant llms.txt. Free.](https://mdream.dev/tools/llms-txt/generator) [**llms.txt Validator**·Check your llms.txt against the official spec.](https://mdream.dev/tools/llms-txt/validator) [**llms.txt Guide**·What is llms.txt and how to implement it.](https://mdream.dev/llms-txt/guide) [**Converter Comparison**·Feature and speed comparison of HTML to Markdown converters.](https://mdream.dev/tools/compare) [**Live Benchmarks**·Run HTML-to-Markdown benchmarks in your browser.](https://mdream.dev/tools/benchmarks) [**Token Counter**·Count tokens for ChatGPT, Claude, Gemini, and Llama.](https://mdream.dev/tools/token-counter) [**Accept-header Tester**·Replay agent requests; see what Claude Code gets back.](https://mdream.dev/tools/accept-header) [**AI Visibility Audit**·Check your site for ChatGPT, Claude, Perplexity readiness.](https://mdream.dev/tools/ai-audit) [**Guides**·GEO, AEO, markdown for agents, and AI crawler policy.](https://mdream.dev/guides)

## 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.

[<h3>**#1 Fastest**</h3>33x faster than Turndown on 166kB HTML (0.34ms Rust vs 11.26ms Turndown). Pure JS: 3.26ms.](https://mdream.dev/tools/benchmarks)

### **#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**

32.6kB gzip JS core, 126.8kB Rust WASM. Zero dependencies. Runs everywhere.

## Packages

[**mdream** Rust NAPI engine + WASM for edge. Includes CLI.](https://github.com/harlan-zw/mdream/tree/main/packages/mdream) [**@mdream/js** Pure JS engine. Full hook access, zero native deps.](https://github.com/harlan-zw/mdream/tree/main/packages/js) [**@mdream/crawl** Site-wide crawler to generate llms.txt artifacts](https://github.com/harlan-zw/mdream/tree/main/packages/crawl) [**@mdream/vite** Auto .md generation for Vite sites](https://github.com/harlan-zw/mdream/tree/main/packages/vite) [**@mdream/nuxt** Automatic .md and llms.txt for Nuxt sites](https://github.com/harlan-zw/mdream/tree/main/packages/nuxt) [**@mdream/action** GitHub Action for .md and llms.txt from static HTML](https://github.com/harlan-zw/mdream/tree/main/packages/action) [**Docker** Pre-built image with Playwright Chrome for crawling](https://github.com/harlan-zw/mdream/blob/main/DOCKER.md) [**mdream (crate)** Native Rust crate with CLI. Zero deps, streaming.](https://github.com/harlan-zw/mdream/tree/main/crates) [**Browser CDN** Use via unpkg/jsDelivr with no build step](https://github.com/harlan-zw/mdream#browser-cdn)

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](https://github.com/sponsors/harlan-zw)

### Top sponsors

- [**Jan-Henrik Damaschke**](https://visorian.com)
- [**Daniel Roe**](https://roe.dev)

### Gold sponsors

- [Massive Monster](https://massivemonster.co)
- [Localazy](https://localazy.com)

### Backers

- [NaokiHaba](https://blog.naokihaba.com)
- [Marko](https://github.com/aussieboi)
- [Christian Ducrot](https://www.ducrot.de)
- [Maik](https://github.com/just-maik)
- [Leopold Kristjansson](https://www.leopold.is)
- [ubugeeei](https://wtrclred.io)
- [Email Testing for Developers - SMTP Labs, Inc.](https://smtp.dev)
- [Laioutr GmbH](https://www.laioutr.com)
- [Elmo](https://www.elmohq.com)
- [AdKit](https://adkit.so)
- [AMZ Cart Share](https://amzcartshare.com)
- [SERPent](https://serpent.so)
- [LYNX SEO Agency](https://www.lynxseo.com)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://mdream.dev/#website","@type":"WebSite","description":"Convert HTML to Markdown online. 33x faster than Turndown, 38% fewer tokens. Free, zero dependencies, LLM optimized. Available as npm package, Rust crate, WASM, and CLI.","name":"mdream","url":"https://mdream.dev/","publisher":{"@id":"https://mdream.dev/#identity"}},{"@id":"https://mdream.dev/#webpage","@type":"WebPage","description":"Ultra-fast HTML to Markdown converter optimized for LLMs. Available as npm package, Rust crate, WASM, and CLI.","name":"Mdream — HTML to Markdown Converter","url":"https://mdream.dev/","about":{"@id":"https://mdream.dev/#identity"},"isPartOf":{"@id":"https://mdream.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://mdream.dev/"]}],"primaryImageOfPage":{"@id":"https://mdream.dev/#logo"}},{"@id":"https://mdream.dev/#identity","@type":"Organization","name":"Mdream","url":"https://mdream.dev","logo":{"@id":"https://mdream.dev/#logo"}},{"@id":"https://mdream.dev/#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","name":"Mdream","operatingSystem":"Any","offers":{"@type":"Offer","availability":"https://schema.org/InStock","price":"0","priceCurrency":"USD","priceValidUntil":"2027-12-30T00:00:00.000Z"}},{"@id":"https://mdream.dev/#logo","@type":"ImageObject","caption":"Mdream","contentUrl":"https://mdream.dev/logo.svg","inLanguage":"en","url":"https://mdream.dev/logo.svg"}]}
```

## Sitemap

See the full [sitemap](https://mdream.dev/sitemap.md) for all pages.
