Converter

HTML to Markdown

Paste HTML and get clean Markdown back. Useful for CMS migrations, archiving in Obsidian or Notion, and versioning copy in git.

Instant🔒In your browserNo signup
Live

When the reverse conversion makes sense

Markdown to HTML is the everyday flow, but the opposite path has legitimate cases too. When you migrate a legacy WordPress blog to a modern static site (Astro, Hugo, Eleventy), every post lives as HTML inside the database. Converting it to Markdown lets you version the copy in git and edit it in a plain-text editor without opening a CMS panel.

Real use cases

  • CMS migration. WordPress, Drupal, Ghost — all of them export HTML. Markdown is the universal intermediate format to land on a different platform.
  • Archiving in Obsidian or Notion. If you save articles from external blogs, Markdown is the native format of these tools.
  • Versioning in git. Markdown produces readable diffs; HTML doesn't. A small copy edit is crystal clear in git diff.
  • Cleaning pasted HTML. When you copy from Word or Google Docs into an editor, dozens of junk tags come along. Converting to Markdown wipes them all in one shot.

What gets lost in the conversion

Markdown is deliberately limited in expressiveness: it only supports basic elements. In the conversion you lose inline styles (red color, 14px font-size), CSS classes, custom attributes (data-*, aria-*), advanced semantic tags (article, section, aside) and anything that's pure presentation. That's a feature: the content comes out free of visual junk and can be re-rendered with any styling later.

What gets preserved

  • Heading hierarchy (h1-h6).
  • Paragraphs and meaningful line breaks.
  • Emphasis (strong, em, b, i).
  • Lists (ul, ol) with basic nesting.
  • Links and URLs.
  • Images with alt and src.
  • Code blocks and inline code.
  • Block quotes.

Tips for a clean conversion

Before converting, run the HTML through a sanitizer if it comes from Word or Outlook: those editors inject markup like <o:p>, <span style="..."> and other treats. Also strip <style> and <script> blocks beforehand — they add nothing to the final Markdown. If your HTML uses tables and you need to keep them, consider a fuller parser: standard Markdown represents them poorly.

Format size diff

A typical HTML paragraph runs 80 characters between tags: <p>Hello world</p>. The same in Markdown is 11: Hello world. Times thousands of paragraphs and the difference is brutal in databases and repos. A site that stores content as Markdown and compiles to HTML on demand is always lighter.

FAQ

Why convert HTML to Markdown?

For CMS migrations, archiving in Obsidian/Notion, versioning copy in git, or cleaning pasted HTML.

Does it preserve formatting 100%?

No. Markdown is less expressive than HTML: it drops inline styles, CSS classes and custom attributes. It preserves semantic structure.

Does it upload anything?

No. Conversion is 100% local in the browser.

Was this generator useful?