HTML to Markdown
Paste a snippet of HTML and get a quick Markdown approximation. This is a lightweight regex-based converter for common inline and block elements, not a full HTML parser.
# Title Some **bold** text.
How to use this tool
- 1
Paste or type your HTML into the input textarea.
- 2
Watch the Markdown output update live in the gray panel below as you edit.
- 3
Select the converted Markdown and copy it into your editor or content file.
- 4
Spot-check the result and hand-fix anything the converter dropped, such as images or tables.
How does this HTML to Markdown converter actually work?
Markdown is a plain-text formatting syntax (popularized by John Gruber in 2004) that maps a small set of symbols to HTML: # for headings, ** for bold, * for italic, - for list items, and [text](url) for links. This tool runs the reverse mapping, but it does so with a handful of regular expressions rather than a real DOM parser. It rewrites <h1>, <h2>, and <h3> tags into #, ##, and ### prefixes, converts <strong> to **, <em> to *, turns each <li> into a leading dash, unwraps <p> tags into blank-line-separated blocks, and matches anchors of the exact form <a href="...">text</a>. Any remaining tags are simply stripped. Because it is regex-driven, it has real blind spots: it does not produce Markdown for images, tables, code blocks, blockquotes, h4 through h6, or ordered lists, and it cannot handle nested lists or attributes in an unexpected order. Links only convert when the href uses double quotes and the link text contains no inner tags. Treat the output as a fast first draft, then clean up by hand or move to a parser-based library like Turndown for production migrations.
Common use cases
Quickly turn a copied HTML paragraph from a web page into Markdown for a README or blog post.
Draft Markdown documentation from small HTML snippets without installing a Node toolchain.
Strip the tag soup out of pasted rich text down to clean headings, bold, and links.
Prototype a content migration to see roughly how an HTML article maps to Markdown before scripting it.
Convert a simple HTML bulleted list into Markdown dashes for a checklist or issue body.
Teach or demonstrate the relationship between HTML elements and their Markdown equivalents.
Frequently asked questions
Does this convert images or tables?▼
Why did my link not convert?▼
Does it handle ordered or nested lists?▼
Is my HTML uploaded to a server?▼
Why is the output messy for complex pages?▼
What should I use for a large production migration?▼
Related tools
Word & Character Counter
Count words, characters, sentences, paragraphs.
Reading Time Calculator
Estimate reading time for any text.
Headline Analyzer
Score headlines for engagement and SEO.
Email Subject Line Tester
Score email subject lines for open rate.
Markdown to HTML
Convert Markdown to HTML.
Twitter Character Counter
Count characters for Twitter/X posts.