HTML to Markdown Converter

Turns an HTML file into clean Markdown — headings, lists, tables and links survive; scripts, CSS, navigation and tracking markup do not. Open the converter. The file is processed in your browser.

Convert HTML to Markdown →

Most of a saved web page is not the page

Save an article from a browser and the file you get is mostly furniture: a navigation bar, a cookie notice, a newsletter box, three analytics snippets, a stylesheet, a footer full of links to other articles. The piece you wanted is somewhere in the middle. Converting to Markdown throws away everything that is not content, because Markdown has no syntax for any of it — there is no way to express a <script> or a CSS class, so they simply do not survive.

That is the real reason this conversion is useful before feeding something to a language model. You are not reformatting the article so much as removing the several thousand tokens of markup wrapped around it.

What survives, and what does not

KeptDropped
Headings, in their levels<script> and <style>
Paragraphs, lists, block quotesClasses, ids, inline styles
Tables, as Markdown tablesNavigation, headers, footers
Links, with their targetsImages (the tag goes, the file was never here)
Bold, italic, inline and block codeForms, iframes, embeds

Links keep their targets, which is worth checking before you paste the result somewhere: a page full of relative links converts to a page full of relative links, and they will not resolve anywhere else.

What the structure costs

What the page holdsPlain textMarkdownDifference
Prose only53 tokens52 tokens1.9% cheaper
Headings and lists57 tokens60 tokens+5.3%
A table35 tokens59 tokens+68.6%
All three together146 tokens172 tokens+17.8%

Those are token counts from our own converter, on a PDF we built for the purpose, measured with the same tokeniser the GPT models use. The pattern is the useful part, and it is not the one usually quoted:

Where it is the wrong tool

Frequently Asked Questions

Open the converter, choose HTML as the input and Markdown as the output, and drop your .html file in. It converts in your browser and downloads as .md. Headings, lists, tables and links are kept; scripts, styling and navigation are dropped.
No, and that is deliberate. Fetching a page for you would mean a request from our server to that site, which would break the promise that nothing here leaves your browser. Save the page from your browser first, then convert the file.
Because most of a saved web page is furniture — navigation, cookie notices, stylesheets, analytics, footers. Markdown has no syntax for any of it, so it all disappears, and what is left is the article. You are mostly removing markup rather than reformatting prose.
No. Markdown references images by path rather than containing them, and a single .md download has nowhere to put the files. The image tags are dropped rather than turned into links that lead nowhere.
It was probably a single-page app whose content is drawn by JavaScript after the page loads, so the saved HTML holds only the shell. Try your browser's Reader view, or "Save as… Web page, complete", and check the saved file actually contains the words before converting.

Related tools