← Imperial Products / Tools / HTML to Markdown

HTML to Markdown Converter

Paste HTML on the left and get clean, readable Markdown on the right. Converts instantly as you type. 100% client-side — no data is ever uploaded.

Privacy: All conversion happens locally in your browser using DOM parsing. Your HTML is never sent to any server.
HTML Input paste or type HTML here
0 characters 0 lines
Markdown Output read-only
0 characters 0 lines

What is an HTML to Markdown Converter?

An HTML to Markdown converter reads HTML markup and outputs equivalent Markdown syntax. Markdown is a lightweight plain-text formatting language designed to be readable as-is and easily converted to HTML. Converting in the reverse direction — from HTML back to Markdown — is useful when you need to move content into a Markdown-based system such as GitHub, a static site generator, a documentation platform, or any CMS that accepts Markdown.

This tool parses your HTML using the browser's built-in DOM engine, then walks the resulting node tree to produce idiomatic Markdown. Because it uses real DOM parsing rather than regex string replacement, it handles nested elements, mixed content, and malformed markup gracefully.

When Should You Convert HTML to Markdown?

HTML vs Markdown: Key Differences

HTML is a full markup language with tags, attributes, nesting rules, and a large feature set. Markdown is intentionally minimal: it covers everyday formatting needs with a syntax that is readable in its raw form. The trade-off is that Markdown cannot express every HTML construct — things like inline styles, complex table attributes, or arbitrary class names have no Markdown equivalent. For most prose and documentation, however, Markdown is sufficient and far easier to author and maintain.

Markdown Syntax Reference

ElementHTMLMarkdown
Heading 1<h1>Title</h1># Title
Heading 2<h2>Section</h2>## Section
Heading 3–6<h3></h3> …### … ######
Bold<strong>text</strong>**text**
Italic<em>text</em>*text*
Strikethrough<del>text</del>~~text~~
Inline code<code>expr</code>`expr`
Code block<pre><code></code></pre>```lang … ```
Link<a href="url">text</a>[text](url)
Image<img src="url" alt="text">![text](url)
Unordered list<ul><li></li></ul>- item
Ordered list<ol><li></li></ol>1. item
Blockquote<blockquote></blockquote>> text
Horizontal rule<hr>---
Line break<br>two trailing spaces or \
Table<table>…</table>GFM pipe syntax

How to Use This Converter

Supported HTML Elements

More Free Online Tools