What is HTML to Markdown conversion?
HTML to Markdown conversion rewrites a page in Markdown: headings become #, links become [text](url), lists become bullets, tables become pipe-delimited rows. Everything that exists purely for presentation, the class attributes, the wrapper divs, the inline styles, the scripts, is dropped.
The reason it has become a standard step is size. A page that is 400KB of HTML is often 15KB of Markdown carrying the same information a reader would take from it.
Why not plain text
Stripping tags entirely is simpler and loses more than people expect. Plain text cannot tell a heading from a sentence, so a model reading it has no idea which parts are section titles. It flattens tables into runs of words with no column relationship. It drops link targets, so any reference to "see the pricing page" leads nowhere. And it destroys code blocks, which matters for technical content.
Markdown keeps exactly the structure that carries meaning and drops the rest, which is why it sits in the middle of these two.
| Raw HTML | Markdown | Plain text | |
|---|---|---|---|
| Size | Largest | Roughly 5 to 10% of HTML | Smallest |
| Headings | Kept | Kept | Lost |
| Tables | Kept | Kept | Flattened |
| Links | Kept | Kept | Targets lost |
| Noise | Heavy | Minimal | None |
Where it matters most
Feeding models. Context windows are finite and expensive. Sending 400KB of HTML where 15KB of Markdown says the same thing wastes most of a request, and on a long page it can exceed the window outright.
Retrieval pipelines. Markdown's structure is what makes chunking on headings possible, which is a better split than a fixed character count.
Storage and diffing. A stored Markdown copy is small, and comparing two versions shows content changes rather than every class name a build tool regenerated.
What conversion does not solve
Boilerplate survives it. Navigation, footers, cookie banners and related-article rails all convert to perfectly clean Markdown, and they still are not the article. Converting a page produces a smaller page, not the main content.
That is a separate step, extracting the main content, and it is usually worth doing first or alongside.
Where Zenrows fits
Markdown response returns the page as Markdown from the fetch itself, by setting response_type=markdown, so there is no separate conversion library in your pipeline. Plain text is available for the cases where structure genuinely does not matter, and output filters go further by returning only chosen data types such as headings or links.
In the docs
Last updated: Aug 16, 2026