HTML to Markdown

Convert HTML to clean Markdown using Turndown — preserve headings, lists and code.

Paste HTML and get clean Markdown back. Headings, lists, code blocks, links and images are all preserved with sensible defaults. Useful for migrating from a WYSIWYG CMS to a Markdown-based static site.

Common use cases

  • Migrate WordPress or Ghost posts to Hugo, Astro or 11ty
  • Convert pasted-from-Word HTML emails into Markdown for docs
  • Strip styling from a rich-text export before publishing on GitHub
  • Round-trip CMS content through Markdown for version control

Frequently asked questions

Will it preserve nested lists?▾
Yes — Turndown handles arbitrarily nested ordered and unordered lists.
What about styles or class attributes?▾
Markdown has no concept of classes or inline styles, so they're dropped. Headings, emphasis and code blocks are preserved.
Does it support fenced code blocks?▾
Yes — we configure Turndown to use fenced (``` ) code blocks instead of indented.

Related tools