HTML to Markdown
Convert HTML to clean Markdown. Paste any HTML snippet — headings, links, images, lists, tables, code — and get Markdown output instantly.
About this tool
This converter takes a snippet of HTML and produces clean Markdown — the format used by GitHub READMEs, Notion, Hugo, Astro Content Collections, and most static-site generators. It handles headings, bold/italic, links, images, ordered and unordered lists, blockquotes, inline and fenced code blocks, horizontal rules, and GFM tables.
Example: pasting <h2>Setup</h2><p>Run <code>npm install</code> first.</p> yields ## Setup\n\nRun `npm install` first. — ready to paste into a .md file.
Common use cases: migrating a blog from a CMS that exports HTML, cleaning up rich-text email content for a knowledge base, or turning a copied web fragment into Markdown for a README.
FAQ
Which Markdown flavour does it output? ›
GitHub-Flavoured Markdown (GFM). Tables become pipe-table syntax, code blocks use triple backticks, and task-list checkboxes are preserved. The output renders correctly on GitHub, GitLab, and most modern Markdown parsers.
Are nested lists supported? ›
Yes. The converter tracks list nesting depth and emits the correct indentation (two spaces per level for ul, four for ol mixed with ul), which GFM and CommonMark both accept.
What happens to tags Markdown cannot represent? ›
Unrecognised tags such as div and span with no semantic equivalent are dropped while their inner text is kept, so no content is lost. Script and style blocks are removed entirely.