Convert HTML to Markdown in your browser
Paste markup or drop an .html file. Headings, lists, links, images, code blocks and tables come out as Markdown, scripts and styles do not, and the token estimate tells you what the result costs in a prompt. The conversion runs on your machine; nothing is uploaded.
Paste a fragment or a whole document; a file dropped onto the field is read locally.
This tool runs in your browser and needs JavaScript.
Observations, not verdicts. What you enter is processed for this result and written to a usage journal described in the privacy policy; nothing else is stored.
HTML to md, in three steps
-
Paste or drop
A fragment, a full page with head and body, or a saved .html file. The head is ignored; the body is converted.
-
Check the tables and code
Tables become GFM pipe tables when every row has the same number of cells, and fall back to nested lists when they do not. pre and code become fenced blocks with the language from the class where one is set.
-
Copy or download
The result goes to the clipboard or to a .md file. The token estimate beside it is characters divided by four and is an estimate, as labelled.
What the converter keeps, drops and cannot know
Markdown is a smaller language than HTML, so every converter is a set of decisions about what to keep. This one is tuned for one purpose: producing text that a model reads well and a person can still edit. That biases it towards structure and away from presentation.
Kept
Headings h1 to h6 become ATX headings. Paragraphs, ordered and unordered lists with nesting, block quotes, horizontal rules, links with their href, images with their alt text and src, emphasis and strong, inline code, and line breaks inside a paragraph all have a direct equivalent and get it. Tables become GFM tables, with the header row taken from thead or from the first row of th cells, and cell content flattened to one line because Markdown tables cannot hold a paragraph. Fenced code blocks carry the language when the class on the code element names one, in the language-x or lang-x convention.
Dropped
script, style, noscript, template, iframe and object are removed with their content. Comments are removed. Inline styles, classes, ids and data attributes have no representation in Markdown and disappear, which is most of the point: a page's HTML is frequently ten times the size of its content, and nearly all of the difference is markup a model does not need. Empty elements and runs of whitespace collapse.
Cannot know
The converter does not fetch anything. Relative links stay relative, because it does not know the base URL unless the document carries a base element. Images referenced by URL stay references. Content that a script would have inserted is not there, because no script runs. And the converter has no opinion about which part of a page is the article: if you paste a whole page, you get the whole page in Markdown, navigation and footer included. The website-to-text tool is the one that makes that judgement, for a URL rather than pasted markup.
In your browser
The conversion is a pure function over the pasted string and runs entirely in the page. No request carries the HTML, and no request carries the Markdown; you can confirm that in the network panel. Nothing is stored, and closing the tab discards the input. This is also why the tool works offline once the page has loaded, and why there is no size limit beyond what your browser tab is willing to hold.
The token count is characters divided by four, and the label says estimate because it is one. Tokenisers vary between models, Markdown syntax characters tokenise differently from prose, and tables in particular cost more tokens than their text suggests because every pipe and dash is a token. Use the number to compare two versions of the same document, not to bill against.
Questions about converting HTML to Markdown
How do I convert HTML to Markdown?
Paste the markup or drop the file above. The Markdown appears beside it with headings, lists, links and tables preserved and scripts and styles removed; copy it or download it as .md.
Does it handle tables?
Yes, as GFM pipe tables when the rows are regular. Cells are flattened to one line. Irregular tables with spanning cells become nested lists, which lose the grid but keep the text.
Is my HTML uploaded?
No. The conversion runs in your browser tab. You can watch the network panel while converting and see no request.
Can it convert a URL?
Not this tool; it has no fetch. The website-to-text tool takes a URL, extracts the main content and returns Markdown.
Why is the token count different from my model's?
It is characters divided by four. Every tokeniser differs, and Markdown punctuation tokenises differently from prose. Use it to compare versions, not as a bill.
Where converted Markdown ends up
Prompts and system context
Documentation, policies and product descriptions pasted as Markdown cost a fraction of the HTML and keep the structure a model uses to find its way around.
Knowledge bases and wikis
Legacy HTML help pages migrate to a Markdown-based system with headings and tables intact, ready for a human edit.
Version control
Markdown diffs line by line. A change to a paragraph shows as a changed line rather than a changed blob of markup.
Extraction pipelines
Inside a Browserberg session, the agent view already provides a structured reading of a live page; this converter is for markup you already have.
Related tools
- Website to text The same output from a URL, with the main content selected for you
- XPath tester Pick the part of the HTML you want before converting it
- What the agent sees How a live page is turned into a structured reading for an agent
- All tools Eighteen tools for automation, consent and compliance
Read live pages the same way
Five browser hours, no card. A session's observe call returns a structured reading of any page an agent can reach, login included.