TanodTools

HTML to Markdown converter

Paste HTML or open an .html file and get tidy Markdown for a README, a wiki or a notes app.

Runs entirely in your browser

Paste HTML to begin.

HTML up to about 5 MB, pasted or from an .html file. The result updates as you type.

How to convert HTML to Markdown

  1. Paste your HTML into the box, or open an .html file.
  2. Pick the heading, list and code block style you want. Tables are turned into Markdown tables unless you switch that off.
  3. Copy the Markdown or download it as a .md file.

Turning web pages into Markdown

Moving content out of a web page, an old CMS or a rich-text editor and into a README, a static site or a notes app usually means converting HTML to Markdown. The converter walks the HTML structure and writes each element in its Markdown form: headings become # lines, lists become dashes, links become [text](url), and <pre><code> becomes a code block.

Markdown only describes structure, so styling is left behind. Inline styles, classes, colours and layout containers disappear, while the words, emphasis, links, images and lists stay. Tables are written as GitHub Flavored Markdown tables when they are simple enough to fit that format.

Different projects prefer different Markdown habits, which is why the heading, list marker, code block and italic styles can be changed. Most renderers accept any of them.

Tips

Questions

Is my HTML uploaded?

No. It is converted in your browser with the open-source Turndown library, and nothing is sent anywhere or stored.

Does it load images or run scripts in the HTML?

No. The HTML is read into a detached document that the browser never displays, so scripts do not run and images, fonts and stylesheets are not fetched. Script and style blocks are dropped from the result.

How are tables converted?

Simple tables become GitHub-style Markdown tables, with the first row as the header and left, centre or right alignment kept when the HTML sets it. Tables with merged cells (rowspan or colspan) or a table inside a table can't be written as Markdown tables, so they are kept as HTML, which most Markdown renderers display as is. You can switch table conversion off to keep every table as HTML.

What is the difference between the heading and code styles?

ATX headings start with # signs (# Title) and work at every level; Setext headings underline the text with = or - and only exist for levels 1 and 2, so deeper headings still use #. Fenced code blocks wrap code in triple backticks and keep the language name from a language- class; indented blocks use four spaces, the older style.

What gets lost in the conversion?

Markdown has no way to express colours, fonts, classes, layout or form controls, so those are dropped and only the text and its structure remain. Strikethrough becomes ~~text~~ and checkboxes in list items become task list markers. Characters that would otherwise be read as Markdown, such as a leading # or *, are escaped with a backslash.