HTML to Markdown converter
Paste an HTML fragment or a whole page and copy the Markdown. Headings, emphasis, links, images, code, nested lists, quotes and basic tables are converted; scripts, styles and comments are dropped. Nothing is uploaded.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Paste the HTML.
- Choose the bullet character and whether images are kept (otherwise the alt text is used).
- Copy the Markdown.
Conversion rules
<h2> becomes ## , <strong> becomes **text**, <em> becomes *text*.
<a href="https://example.com">site</a> becomes [site](https://example.com).
<pre><code class="language-js"> becomes a fenced block starting with three backticks and js.
- Nested
<ul> and <ol> are indented by the width of their marker.
Example
<h1>Title</h1><p>Hello <b>bold</b> <a href="https://x.com">link</a></p> gives:
# Title
Hello **bold** [link](https://x.com)
Tips
- Paste only the content you need; navigation and footers convert to plain paragraphs too.
- Missing end tags on
li, p and table cells are tolerated.
Frequently asked questions
What is converted?
Headings h1 to h6, paragraphs, strong/b, em/i, del/s, links, images, inline code, pre blocks (with the language from a language-xxx class), ordered and unordered lists including nesting, blockquotes, horizontal rules, line breaks and simple tables.
What happens to tags that have no Markdown equivalent?
Containers such as div and section just contribute their content. Unknown inline tags keep their text. Script, style, head, svg and comments are removed completely.
Why are some characters escaped with backslashes?
Characters such as *, _, backticks, brackets and < would otherwise be read as Markdown. The converter escapes them so the text stays literal; underscores inside words are left alone.
How are tables converted?
To GitHub-style pipe tables: the first row becomes the header. Merged cells (colspan, rowspan) are not represented, nested content is flattened to text, and pipes in cells are escaped.
Is the conversion exact?
Markdown is simpler than HTML, so layout, classes, styles and other attributes are lost. Review the output for complex pages. Links with javascript: addresses are reduced to their text.