HTML to Markdown Converter
Convert HTML to clean, readable Markdown instantly — no server, no login.
Turn HTML into Readable Markdown
This HTML to Markdown converter takes markup from a web page, a CMS export, an email template or a rich-text editor and rewrites it as plain Markdown. It is useful when you move content into a static site generator, a GitHub README, a wiki, a docs folder, or a note-taking app, and when you want to paste web content into an AI chat or code review without the noise of tags and attributes. It is the reverse of the Markdown to HTML converter.
How to Use the HTML to Markdown Converter
- Paste markup into the Input (HTML) box, click Upload .html to open a file from your device, or click Load Sample HTML to try an example.
- Pick your Conversion Options: Heading Style (ATX or Setext), Bullet Style (dash or asterisk) and Code Block Style (fenced or indented).
- Click Convert HTML to Markdown. The tool switches to the Output (Markdown) tab. After the first conversion, changing an option re-converts automatically.
- Click Copy Markdown, or Download .md to save the result as converted.md. Clear All empties both boxes.
Character counts under each box show the size of your HTML and of the generated Markdown.
Example Conversion
This HTML:
<h2>Release notes</h2>
<p>Version <strong>2.1</strong> adds
<a href="/docs" title="Docs">offline docs</a>
and fixes <em>three</em> bugs.</p>
<ul>
<li>Faster export</li>
<li>New <code>--quiet</code> flag</li>
</ul> becomes this Markdown with the default options:
## Release notes
Version **2.1** adds [offline docs](/docs) and fixes *three* bugs.
- Faster export
- New `--quiet` flag The link's title attribute is gone, because the converter keeps only the link text and href. Line breaks and indentation from the HTML source are collapsed into single spaces, the way a browser displays them, so the paragraph comes out as one line. Only a <br> produces a line break, and whitespace inside <pre> and <code> is kept exactly.
How Each HTML Element Is Converted
| HTML | Markdown output |
|---|---|
| h1 to h6 | # to ###### (or Setext for h1, h2) |
| strong, b | **bold** |
| em, i | *italic* |
| del, s | ~~strikethrough~~ |
| a | [text](href), or just the text if there is no href |
| img |  |
| code | `inline code`, with a longer ``fence`` if the code contains backticks |
| pre | ``` fence, or 4-space indent |
| blockquote | > quoted lines, with a lone > line between paragraphs |
| ul, ol | - or * bullets; 1. 2. 3. from the list's start number; sub-lists indented under their item |
| table | | pipe | table | |
| br | two spaces + line break |
| hr | --- |
| script, style, head | removed entirely |
| div, span, section, others | tag dropped, content kept |
Attributes such as class, id and style are discarded, because Markdown has no place for them. HTML entities are decoded by the browser's parser, so & becomes & and © becomes ©.
Choosing the Output Options
- Heading Style: ATX headings (
## Title) work at every level and are what most tools expect. Setext underlines a heading with===(h1) or---(h2); it only exists for those two levels, so h3 to h6 still use # signs. - Bullet Style: dash and asterisk produce identical lists. Match whatever your project's linter or style guide uses.
- Code Block Style: fenced blocks are easier to read and let you add a language name after the opening backticks. Indented blocks are the older syntax supported by every Markdown parser.
How Text Is Escaped
Characters that would change meaning in Markdown are escaped with a backslash, so your text renders exactly as it read in the HTML. That covers *, `, [, ], | and ~ anywhere in a sentence, an underscore unless it sits inside a word like snake_case, and a line that starts with #, >, -, + or a number followed by a period, such as "1. Introduction". Text written as <div> in the HTML comes out as \<div>, so renderers show it instead of treating it as a tag. Nothing inside code spans or code blocks is escaped.
Lists keep their structure: a sub-list is indented under its parent item's text, and an ordered list keeps its start number. When two lists of the same kind follow each other, or an indented code block follows a list, the converter puts an empty HTML comment (<!-- -->) between them, because Markdown would otherwise merge them.
Limitations to Check Before You Publish
- Tables are simplified. Links, bold, italic and inline code inside cells are kept, and pipe characters are escaped as
\|. The first row always becomes the header, column alignment is not kept, and a merged cell (colspan or rowspan) appears once, with empty cells filling the positions it covered. Paragraphs, lists or a table nested inside a cell are flattened into that cell, separated by<br>. - Code languages are not detected. A
class="language-js"on the original code block is dropped, so addjsafter the opening fence if you want highlighting. - Block content inside a link is joined into one line. A link that wraps a heading and a paragraph, as on many article cards, becomes a single link whose text contains both.
To review the result, paste it into the Markdown Editor, which shows a live preview while you fix any of the points above.
Frequently Asked Questions
Is my HTML uploaded anywhere?
No. The page parses your HTML with the browser's built-in DOMParser and builds the Markdown with JavaScript in your tab. Pasted text and uploaded files are not sent to a server.
What happens to HTML tags that have no Markdown equivalent?
Script, style and head elements are removed along with their content. Other tags without a Markdown form, such as div, span, section, article or form, are dropped but their text and child elements are still converted.
Can it convert HTML tables to Markdown tables?
Yes. Each row becomes a pipe-separated line and the first row becomes the header. Links, bold, italic and code inside cells are kept, merged cells are padded with empty cells so the columns still line up, and a table nested inside a cell is flattened into that cell instead of adding rows. Column alignment is not preserved.
Should I use ATX or Setext headings?
Use ATX unless your project requires Setext. ATX supports all six heading levels and is the default in GitHub, most static site generators and most Markdown linters.
How do I convert a live web page?
The tool does not fetch URLs. Open the page, use your browser's View Source or the developer tools to copy the HTML of the main content element, and paste it in. Copying only the article body avoids carrying menus, footers and cookie banners into your Markdown.
Does the converter handle HTML entities?
Yes. Named and numeric entities such as &, ", © and are decoded into their characters. A non-breaking space stays a non-breaking space character rather than turning into a normal space.
Love using BreezyTools?
Go Pro for an ad-free experience, priority features, and support independent development — for less than a coffee a month.