HTML to Markdown Converter
Convert HTML to clean Markdown in your browser. Supports headings, bold, italic, code, links, images, lists, blockquotes, and rules. Decodes entities, escapes Markdown characters, and strips script and style blocks.
HTML to Markdown Syntax Reference
| HTML | Markdown output | Use |
|---|---|---|
| <h1>Title</h1> | # Title | Heading |
| <strong>bold</strong> | **bold** | Strong emphasis |
| <em>text</em> | *text* | Emphasis |
| <code>const x</code> | `const x` | Inline code |
| <a href="https://example.com">Link</a> | [Link](https://example.com) | Link |
| <ul><li>Item</li></ul> | - Item | Unordered list |
Frequently Asked Questions about the HTML to Markdown Converter
Will the output round-trip cleanly through the Markdown to HTML converter?
Only for simple content in the shared supported subset. Attributes, unsupported elements, nesting details, and malformed markup may be dropped or changed, so neither byte identity nor matching element counts is guaranteed. Keep the original source when lossless round-tripping matters.
Which HTML tags does this converter understand?
Headings h1 through h6, paragraphs (p), bold (strong, b), italic (em, i), inline code (code), code blocks (pre, pre + code with a language- class), links (a with href), images (img with src and alt), unordered lists (ul + li), ordered lists (ol + li), blockquotes, horizontal rules (hr), and hard line breaks (br). Wrapper tags (span, div, sub, sup, small, mark, u, s, del, ins, kbd, abbr, cite, q, big, tt, var, samp) are stripped but their text content is kept. Script and style blocks are dropped entirely so a copy-paste from a real page never produces executable Markdown. Anything else is treated as an unknown tag: the wrapper is dropped, the text inside survives. Tables, definition lists, forms, iframes, and SVG are not converted; they show up as plain text or get stripped, depending on the tag.
Why does regex-based parsing have edge cases?
HTML parsing depends on a tree-building algorithm, while this converter applies patterns to source text. Nested lists, malformed markup, cross-nested tags, CDATA, and tag-like text inside attributes can therefore produce incomplete output. Use a maintained HTML parser and tree-based converter when structure or lossless handling matters.
How are HTML entities decoded?
The converter decodes a small named set: &, <, >, ", ', and . It also decodes numeric references, such as A for A and é for an accented e. Other named references remain unchanged. Use a conforming HTML parser when you need the full entity table.
Why does the Markdown output have backslashes in front of regular characters?
Characters that have meaning in Markdown when they appear in regular prose get a leading backslash so the output round-trips without surprises. The escaped set is backslash, backticks, asterisks, underscores, hashes, square brackets, and parentheses. So 'cost is $5 *plus* tax' becomes 'cost is $5 \*plus\* tax' in the output, which still renders as the literal text 'cost is $5 *plus* tax' when fed to a Markdown parser. Without the escapes, a Markdown parser would treat the asterisks as italic markers and emit '<em>plus</em>' instead. Characters that only have meaning at the start of a line (a leading dash for a list, a leading > for a quote) are not escaped: they only matter if the line starts with them, and we keep prose readable instead of overly defensive.
Related Calculators
More calculators in "Tech"
JSON FormatterRegex TesterMTU CalculatorWiFi Channel Overlap CalculatorIPv6 Subnet CalculatorHTML Character Entities Encoder/Decoder
See all 98 calculators in "Tech"