HTML to Markdown

Convert HTML markup to clean Markdown format.

Paste an HTML fragment and get the equivalent Markdown, with headings, lists, links, tables and code blocks all translated to their Markdown forms. Inline-only elements without a Markdown equivalent are preserved as raw HTML so no content is silently lost.

Common use cases: migrating posts from a WYSIWYG CMS to a Markdown-based static site, cleaning up an email or rich-text snippet before pasting into a docs file, converting Notion/Google Docs exports for version control, and turning AI-generated HTML answers into reviewable Markdown.

HTML

Markdown

Frequently asked questions

Which HTML elements does it convert?
All the standard block and inline elements that have a Markdown equivalent: headings, paragraphs, lists, links, images, code blocks, blockquotes, tables, bold/italic, and horizontal rules. Elements without a Markdown equivalent (e.g. <div> with classes) are unwrapped or skipped depending on context.
Will styles, classes and IDs survive?
No — Markdown has no concept of arbitrary attributes. Inline CSS and class names are dropped. If you need to preserve styling, keep the HTML as HTML or use a Markdown dialect like MDX that allows raw HTML passthrough.
How are tables handled?
HTML tables become GitHub-flavored Markdown tables with pipe separators. Complex cells (those containing block elements or row/column spans) may not translate perfectly — Markdown tables are strictly grid-shaped.
Why are some inline elements left as raw HTML in the output?
Markdown explicitly allows inline HTML passthrough for cases it can't express (e.g. <sub>, <sup>, video embeds). The converter prefers raw HTML over silent data loss when no clean Markdown equivalent exists.