HTML to Markdown
Convert HTML to clean Markdown text for documentation or README files — now rebuilt on a real DOM parser and recursive tree-walker instead of a sequential regex pipeline. Three previously-confirmed structural-destruction bugs are now fixed: nested lists correctly preserve every bullet with proper indentation, HTML tables now convert into real Markdown tables, and a <p> nested inside a <blockquote> or <li> (common CMS/Google-Docs output) keeps its paragraph boundary instead of merging into a run-on sentence.
No HTML provided
How to Use This Tool
Paste HTML content into the input textarea
this tool now parses it into a real DOM tree and recursively walks it, correctly handling arbitrary nesting.
Nested lists convert correctly now, with every bullet preserved and each sub-list properly indented beneath its parent item.
Nested lists convert correctly now, with every bullet preserved and each sub-list properly indented beneath its parent item.
Pro Tip
The three structural risks that previously required manual verification — nested lists, HTML tables, and multi-paragraph blockquotes/list items — are all now fixed, so you can trust the converter's output for real-world CMS and rich-text-editor HTML. Stripping inline styling attributes (style=, class=) from Google-Docs-sourced HTML before converting is still worthwhile cleanup for a cleaner-looking source, though the converter itself already ignores them.
About This Tool
When to Use
- Converting a webpage's article content into Markdown for archiving in a personal notes app like Obsidian, including multi-paragraph pull-quote blockquotes, which now correctly keep each paragraph separate.
- Turning rich-text content copied from a CMS editor into clean Markdown for a project's README file
- Migrating documentation from an HTML-based wiki into a Markdown-based static site generator
Key Details
An HTML-to-Markdown converter strips HTML markup down to clean Markdown syntax — headings, bold/italic, links, lists, and code blocks — making it the reverse tool for pulling web content into a README...
Worked example
Input: <h2>Setup</h2><p>Run <code>npm install</code> and read the <a href="https://example.com">guide</a>.</p> converts cleanly into ## Setup on its own line, followed by a paragraph reading Run `npm install` and read the [guide](https://example.com). — ready to paste directly into a README.md file. A two-item nested list (<ul><li>Parent item<ul><li>Nested child</li></ul></li><li>Another parent</li></ul>) now correctly produces three properly bulleted lines: '- Parent item', ' - Nested child' (indented beneath its parent), and '- Another parent' — every bullet marker intact, matching what a Markdown formatter is supposed to produce.
Interpreting your result
Clean, correctly bulleted, indented, and headed output can now be trusted for nested structures too — nested lists, tables, and multi-paragraph blockquotes/list items all convert correctly, matching the structure of the source HTML rather than degrading it.
HTML to Markdown FAQ
What HTML elements can be converted to Markdown?
h1-h6, p, a, img, strong, b, em, i, ul/ol/li (including arbitrarily nested sub-lists), pre, code, blockquote, br, and tables. Unknown elements like div, span, section are unwrapped (content preserved, tags removed), and script/style tags are removed completely.
How are nested HTML elements handled — is list nesting preserved?
Yes, now genuinely — this was previously a confirmed bug where a sub-list nested inside a list item wasn't recursively converted with indentation (the nested item's bullet vanished and its text ran directly onto the parent item's text with no space, while the following top-level item also lost its own bullet). That's fixed: the converter now parses the HTML into a real DOM tree and recursively walks it, so a nested <ul>/<ol> inside a <li> is correctly rendered as an indented sub-list beneath that item, with every bullet marker at every level preserved.
What happens when a paragraph is nested inside a blockquote or list item?
It's preserved as a genuinely separate paragraph now — this was previously a confirmed bug where consecutive <p> tags inside a <blockquote> or <li> merged together with no separator (a common problem since rich-text editors like Google Docs and many CMS platforms wrap each blockquote or list paragraph in its own <p> tag). That's fixed: a two-paragraph blockquote now correctly renders as two separate quoted lines with a blank quoted line between them, and a <p> inside a <li> correctly keeps that list item's own bullet intact.
What happens to HTML tables?
They now convert into a real Markdown table — this was previously a confirmed bug where there was no table-specific conversion logic at all, so a table's cell text across every row got concatenated into one unreadable string with no separators. That's fixed: rows are now rendered as pipe-delimited Markdown table rows with a header separator line, exactly the structure a Markdown table needs.
Can I convert Markdown back to HTML?
Yes! Use our Markdown to HTML converter in the same section. These two tools are designed to work together for bidirectional conversion.
What Markdown flavor does this tool output?
Output follows CommonMark specification for headings, emphasis, links, images, lists, code, and blockquotes, plus GitHub-Flavored Markdown's pipe-table syntax for converted HTML tables — the most widely compatible combination, recognized by GitHub, GitLab, Notion, Obsidian, Jekyll, Hugo, and most documentation tools.
Master Your Entire Toolkit
Access 500+ specialized calculators and tools designed for precision. No sign-up required, 100% free.
Built and reviewed by the Toolzip Team · Based on CommonMark Specification