Skip to content

HTML to Markdown

Convert HTML back into clean Markdown, keeping lists, tables and code.

Scripts, styles and head content are dropped. Layout containers such as div and section are walked through, because Markdown has no equivalent for them.

Quick Tool Overview

The HTML to Markdown converter parses the markup the way a browser would — forgiving unclosed tags and unquoted attributes — then walks the tree, keeping headings, nested lists, tables, links and fenced code, and dropping scripts and styles.

What it does
Converts HTML back into Markdown
You give it
A page, a fragment, or markup from dev tools
You get back
Clean Markdown you can put in version control
Best for
Rescuing content from a CMS, an email or a web page
Developer Tools Free, unlimited use No sign-up Runs in your browser

About the HTML to Markdown

Going from HTML back to Markdown is how you rescue content from a CMS, a rendered page or an email into something you can keep in version control. The converter parses the HTML properly and walks the tree, so malformed markup and omitted end tags are handled the way a browser would.

Headings become hashes, bold and italic become the right markers, links and images keep their URLs and titles, and a link whose text is its own URL is written as a bare URL rather than a redundant pair. Nested lists keep their nesting and their numbering, tables become pipe tables, and a pre block becomes a fence that keeps its language class. Scripts, styles and head content are dropped, and containers such as div and section are walked through rather than represented, because Markdown has no equivalent for them.

Key features of the HTML to Markdown

Forgiving parser

Unclosed paragraphs and list items, unquoted attributes and stray closing tags are handled the way a browser handles them.

Nesting and numbering kept

Nested lists stay nested and ordered lists keep their start value, which is where most converters flatten everything.

Code fences keep their language

A pre block whose code carries a language class becomes a fence with that language, and its content is left unescaped.

Noise dropped

Scripts, styles and head content are removed rather than turned into text, and layout containers are walked through rather than represented.

Bare URLs stay bare

A link whose text is its own URL is written as the URL, not as a redundant label-and-target pair.

How to use the HTML to Markdown

  1. 1

    Paste your HTML

    A full page, a fragment, or a chunk copied from developer tools.

  2. 2

    Set the style options

    Choose the bullet character and whether headings use hashes or underlines.

  3. 3

    Review the Markdown

    Check that lists and tables came through the way you expected.

  4. 4

    Copy the result

    Paste it into a README, a documentation site or a note-taking app.

Frequently asked questions

Their contents are kept and the elements themselves are dropped, because Markdown has no equivalent. If the layout depends on them, that structure is genuinely lost.

Reviews of the HTML to Markdown

What people who use the HTML to Markdown think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the HTML to Markdown. It takes half a minute and no account.

Write the first review

More developer tools