Converters HTML to Markdown Converter

HTML to Markdown Converter

Paste HTML or upload a file up to 200MB and get GitHub-flavoured Markdown, with tables, task lists and fenced code blocks kept.

How to use this tool

Paste HTML or upload an .html file and the Markdown appears as you type. To convert one article rather than a whole saved page, open it in your browser, right-click the article text, choose Inspect, then right-click the highlighted element and pick Copy → Copy outerHTML. That leaves the menu, sidebar and footer out of your Markdown. Scripts and styles are removed automatically.

Why some characters get a backslash

Ordinary text can look like Markdown syntax, so the converter escapes it. Without the backslash, each of these would change meaning when the Markdown is rendered:

  • 2024. A good year becomes 2024\. A good year, or it would start a numbered list at 2024.
  • 5 * 3 becomes 5 \* 3 and file_name_here becomes file\_name\_here, so neither turns into italics.
  • [draft] notes becomes \[draft\] notes, which can't be mistaken for a link.
  • Text that mentions a tag, like "wrap it in a <details> element", becomes \<details>. Unescaped, a renderer would create a real collapsible widget and the words would disappear.

Renderers hide the backslashes, so you only see them in the source. Code inside <code> and <pre> is never escaped.

What vanishes without a trace

Markdown has nothing to hold these, and the converter drops them silently, so check the source first:

  • <iframe> embeds such as YouTube videos and maps, and <video> elements: nothing is left. Add a plain link to each one afterwards.
  • Form fields. Only a button's label survives, as a stray word.
  • Superscript and subscript: mc<sup>2</sup> becomes mc2 and H₂O becomes H2O. That changes the meaning of a formula, so fix these by hand or keep the tags as raw HTML.

Frequently Asked Questions

Why does every list item start with an asterisk and three spaces?

That is the list style of Turndown, the library doing the conversion: "*" plus padding, so that the text of every item lines up and nested lists indent consistently underneath. GitHub, VS Code and other Markdown renderers read it correctly. Headings come out with # marks and code blocks as ``` fences, so only the bullets look unusual.

Do relative links and image paths still work?

They are kept exactly as written. <a href="/pricing"> becomes [Pricing](/pricing), and an image with src="a.png" becomes ![](a.png), with an empty alt text if the original had none. Those paths only resolve if the Markdown ends up on the same site. When moving content elsewhere, replace them with full https:// addresses before or after converting.

What happens to a table?

It becomes a pipe table with the first row as the header. Each cell keeps its text but loses bold, links and line breaks, because a pipe table cell is a single line of plain text. A "|" inside a cell is escaped as "\|" so it doesn't split the column.

Related Tools

Related Blog Posts