HTML to Markdown
Paste HTML on the left, get clean Markdown output on the right in real-time.
What is HTML to Markdown Conversion?
HTML to Markdown conversion turns verbose markup into the lightweight, readable plain text that Markdown was designed for. Instead of nested tags, you get headings, links, lists, and emphasis written in a syntax that is easy to read, easy to version-control, and portable across almost every documentation platform.
This converter uses the Turndown library, a well-known HTML-to-Markdown engine that runs directly in the browser. It produces ATX-style headings such as # Heading, fenced code blocks wrapped in triple backticks, emphasis using asterisks, and bullet lists prefixed with a dash, following common Markdown conventions.
The conversion happens entirely on the client side. Your HTML is parsed in the page and is never uploaded, logged, or stored, which makes the tool safe for content that includes private drafts, internal notes, or proprietary copy. You simply paste, read the result, and copy or download it.
The interface is deliberately simple: an HTML panel on the left, a Markdown output panel on the right, and buttons for copy, download, loading an example, and clearing the editor. Live character, line, and size statistics help you keep an eye on how large the content is before you move it somewhere else.
Key Concepts
- Turndown engine — the conversion is performed by the Turndown library running in your browser.
- ATX headings — heading levels become hash-prefixed lines such as
# Heading. - Fenced code blocks — preformatted code is wrapped in triple backtick fences.
- Asterisk emphasis — emphasis is written with asterisks rather than HTML tags.
- Dash bullets — unordered list items are prefixed with a dash.
- Client-side privacy — the HTML never leaves your browser during conversion.
How to Use
- Paste HTML on the left panel and see the Markdown output update in real-time on the right.
- Review the output and watch the live character, line, and size statistics as you edit.
- Copy the generated Markdown using the Copy Markdown button.
- Download the Markdown as an
output.mdfile when you want to keep it. - Click Example to load a sample HTML document, or use Clear to reset and start fresh.
Tip
Supports headings, bold, italic, links, images, code blocks, lists, blockquotes, tables, horizontal rules, and inline code. The conversion runs 100% in your browser using the Turndown library.
HTML to Markdown Reference
| HTML Element | Markdown Output |
|---|---|
| <h1>Heading</h1> | # Heading |
| <strong>bold</strong> | **bold** |
| <em>italic</em> | *italic* |
| <a href="url">text</a> | [text](url) |
| <img src="url" alt="alt"> |  |
| <pre><code>...</code></pre> | ``` ... ``` |
| <code>code</code> | `code` |
| <ul><li>item</li></ul> | - item |
| <ol><li>item</li></ol> | 1. item |
| <blockquote>quote</blockquote> | > quote |
| <hr> | --- |
| <table><tr><td>A</td></tr></table> | | A | |
Worked Examples
- Heading —
<h1>Title</h1>becomes# Title, and deeper heading tags map to more hash marks. - Bold and italic —
<strong>bold</strong>becomes**bold**while<em>italic</em>becomes*italic*. - Links —
<a href="url">text</a>converts to[text](url). - Images —
<img src="url" alt="alt">converts to. - Code block — a
<pre><code>block becomes a fenced block wrapped in triple backticks. - Lists — an unordered list becomes dash-prefixed lines, and an ordered list becomes numbered lines such as
1. item.
Tips and Common Mistakes
- Paste fragment or full document — the converter handles full pages and snippets; simplify heavily styled blocks first for the cleanest result.
- Styling is lost by design — inline CSS, classes, and layout wrappers are not represented in Markdown, so do not expect pixel styling to survive.
- Check nested lists — deeply nested HTML lists can produce indentation you may want to tidy after conversion.
- Code language hints may be dropped — fenced code blocks are produced, but language identifiers depend on the source markup.
- Use the stats — the character, line, and size readouts help you catch a paste that was accidentally truncated.
- Preview before publishing — render the Markdown in your target platform to confirm tables and blockquotes look right.
Common Use Cases
Markdown is the default format for documentation, README files, and many content systems, so converting existing HTML into it is a frequent task. These are some common situations.
- Documentation migration — move legacy HTML pages into a Markdown-based docs site.
- README files — turn exported HTML content into clean Markdown for a project README.
- CMS and blog content — convert rich-text HTML from an editor into Markdown for a static site generator.
- Email or newsletter copy — strip formatting down to portable Markdown text.
- Note taking — capture web content as Markdown for personal knowledge bases.
- Version control — store readable, diff-friendly Markdown instead of bulky HTML.
Frequently Asked Questions
Can I convert any HTML to Markdown?
This tool supports most common HTML elements including headings, paragraphs, lists, tables, links, images, code blocks, and blockquotes. Complex layouts with extensive CSS styling may produce simplified Markdown.
Is my HTML data sent to a server?
No. All conversion happens 100% client-side in your browser using the Turndown library. Your HTML never leaves your machine.
What is the opposite of this tool?
The opposite is the Markdown to HTML converter, which converts Markdown back to HTML with a live preview editor.
Which library powers the conversion?
The conversion is powered by the Turndown library, which runs inside your browser and turns HTML into conventional Markdown.
What Markdown style does the output use?
It produces ATX headings with hash marks, fenced code blocks with triple backticks, emphasis using asterisks, and dash-prefixed bullet lists.
Can I download the converted Markdown?
Yes. Use the Download button to save the output as an output.md file, or use Copy Markdown to place it on your clipboard.
Does it show statistics while I type?
Yes. The toolbar shows live character and line counts for the input, and the output panel shows the size of the generated Markdown.
Is there a size limit for the HTML?
There is no fixed limit imposed by the tool. Very large documents are processed in your browser and may take slightly longer to convert.