HTML to Markdown

Convert HTML to Markdown.

About the HTML to Markdown

Takes rendered HTML — a docs page, a CMS export, an email template — and gives back Markdown you can commit. Headings use the # form, code blocks come out fenced with the language read from a language- class, and list items use hyphens. Links, images, blockquotes, and inline emphasis all map across. The conversion runs in the page, so a draft or an internal document is never uploaded.

How to use the HTML to Markdown

  1. Paste your HTML into the HTML panel, or press Sample to load an example.
  2. Press Convert.
  3. Check the Markdown panel and fix the HTML if a block came through wrong.
  4. Press Copy, or Download to save it as converted.md.

Frequently asked questions

Are HTML tables turned into Markdown tables?
No. There is no table rule, so the cells arrive as ordinary lines of text with the grid lost. Rebuild the table with the Markdown Table Generator, or paste the cells into it.
What flavour of Markdown does it produce?
Plain Markdown that GitHub and most renderers accept: ## for headings rather than underlines, ``` fences rather than indented code, - for bullets, and _text_ for emphasis.
What happens to script and style tags?
Their contents are not stripped — the JavaScript or CSS comes through as text. Remove those blocks from the HTML before converting, or delete the leftover lines from the Markdown.
Can I go the other way, Markdown to HTML?
Yes, with the Markdown to HTML tool. The two are not perfectly lossless in a round trip, since HTML can express things Markdown has no syntax for.
Is the HTML sent to a server?
No. The converter is JavaScript in your browser tab and there is no backend to receive it.

Related tools