Also available in: Español · Português · Français · العربية
HTML to Markdown Converter
Paste HTML on the left and watch clean Markdown appear on the right, with nothing you type ever leaving your browser.
What is HTML to Markdown conversion?
HTML to Markdown conversion takes markup built from tags like <p>, <h2>, <strong> and <ul> and rewrites it as plain-text Markdown, the lightweight syntax that uses #, * and [links](url) instead of angle brackets. The output reads the same way rendered, but the source file is shorter, diffable, and editable without touching a single tag.
The usual reason to run HTML through a converter like this is that the HTML did not originate as HTML at all, or is not staying that way. A page copied out of a CMS, a rich-text editor's export, or a scraped web page all land as HTML, and the destination is often a place that wants Markdown instead: a README, a static site generator, a notes app, or a docs repository that stores content as .md files and reviews changes as line-by-line diffs.
Because a browser rendered the HTML before you copied it, and a browser will render whatever the Markdown eventually becomes, the conversion only earns its keep if the result looks the same as the input did. That is the standard this tool is built and measured against.
How to convert HTML to Markdown
- Paste your HTML into the left pane. The Markdown equivalent appears on the right as you type, with no button to press and no page reload.
- Adjust the two checkboxes if needed. GitHub extras turns on tables, strikethrough and task lists, and keeping untranslatable HTML preserves tags Markdown has no syntax for instead of discarding them.
- Copy the result and check the element list below it. The copy button grabs the Markdown pane in one click, and the panel underneath names any tag that came through with no Markdown equivalent, so you know exactly what to check before you paste it elsewhere.
There is no spec for this direction, so we measured a round trip
CommonMark is a specification for turning Markdown into HTML. It says nothing about the reverse direction, which means there is no official test suite an HTML-to-Markdown converter can pass, and no way for any tool to honestly claim a percentage of correctness against a standard that was never written for this problem.
What can be measured is a round trip. We took all 652 expected HTML outputs from the CommonMark test suite, converted each one to Markdown with this tool, converted that Markdown back to HTML, and compared the result to the original. 472 of the 652 came back byte-for-byte identical, 72.4%. Allowing for insignificant whitespace differences between tags, 540 of 652 matched, 82.8%.
Those figures are for the settings this page ships with, which keep HTML that Markdown cannot express. Measured with that option switched off instead, the same round trip scores 471 and 538 — so keeping what the format cannot say is not only the safer default, it is very slightly the more faithful one too.
The two GitHub-flavoured options — tables, strikethrough and task lists — do not move either number, because the CommonMark suite itself contains no tables or task lists to test; it only exercises syntax CommonMark defines. Those options matter once you feed the tool real-world HTML, not on this score.
A round trip that fails is not automatically a mistake. Some of the 652 test cases contain HTML that has no Markdown spelling at all, so no converter could carry them through unchanged — which is exactly what the next section is about.
What Markdown cannot express, and why we keep it anyway
Of the 112 round-trip cases that changed, 55 — just under half — are the CommonMark test suite's own HTML-blocks and raw-HTML sections: markup that has no Markdown equivalent, full stop. The remaining 57 are a thin tail of near-misses where an equivalent but differently spelled version came back: nine in lists, nine in links, seven in list items, six in code spans, five in fenced code blocks, five in emphasis, and single-figure counts scattered across a few other categories.
The headline finding is about the format, not this tool: Markdown cannot express everything HTML can. Markdown has syntax for headings, paragraphs, lists, quotes, code, emphasis, links, images and rules, and nothing beyond that. A div, a span, a class, an id, a table cell's alignment, a footnote marker, an embedded video — none of these have a Markdown spelling, in this converter or any other.
That is why, by default, this tool keeps untranslatable HTML as literal HTML sitting inside the Markdown, rather than dropping the tags and leaving only their text behind. Flattening a table into a run-on paragraph, or losing a footnote marker entirely, is the kind of loss nobody notices until much later, when the structure is already gone. Turning off “Keep HTML that Markdown cannot express” is offered as an option, because sometimes plain text is genuinely what you want, but it is the lossy choice, and the panel listing every affected tag by name and count exists so you can see exactly what would be lost before you decide.
The tool also parses your HTML with the browser's own built-in parser rather than a separate one bundled with the page. That keeps the download small, but the real reason is accuracy: the browser's parser is the same one that decides how malformed or unusual HTML renders on screen, so what gets converted matches what you actually saw, rather than a second parser's own guess at the same markup.
Why is it free?
Both panes run entirely in your browser. Pasting HTML in and reading Markdown out never involves a server, so there is nothing to upload, nothing to store, and no file size limit tied to a network connection. There is no account to create, no watermark on the output, and no limit on how many times you use it. It is free because running it costs nothing beyond the page you already loaded.