HTML to Markdown Converter

Convert HTML to clean Markdown online, keeping headings, links, lists and code — free.

About

About the HTML to Markdown Converter

Paste HTML — copied from a web page, an email, or exported from a CMS — and get clean Markdown back instantly, using Turndown, which understands the structure of headings, links, images, nested lists and code blocks rather than just stripping tags and losing the formatting.

Turndown's default style is used: h1 and h2 headings come out underlined with === and ---, h3 and below use # marks, bullets use *, and code blocks are indented by four spaces rather than fenced with backticks. Most Markdown editors read all of these; switch them to # headings and ``` fences by hand if your platform prefers that style.

Choose what to view about this tool

Guide

Using the HTML to Markdown Converter

  1. 1

    Step 1

    HTML to Markdown is already the button to use — Markdown to HTML works the other way.

  2. 2

    Step 2

    Paste your HTML into the input box.

  3. 3

    Step 3

    Click "HTML → Markdown" to see the converted Markdown in the output box.

  4. 4

    Step 4

    Copy the Markdown to paste into a README, a note-taking app, or anywhere else Markdown is used.

  • Converts headings, links, images, lists, bold, italics and code
  • Uses Turndown's default style — underlined h1/h2, * bullets and indented code blocks
  • Drops wrapper tags Markdown has no syntax for, like <div> and <span>, but keeps their text
  • Copy the result in one click
  • Loads the conversion library from this site the first time you use it
  • Runs in your browser — free, with no sign-up and nothing uploaded

Site migrators

Teams moving to Hugo, Jekyll or Ghost convert old HTML pages into Markdown.

Developers

Developers turn an HTML snippet into Markdown for a README or pull request.

Note-takers

Note-takers bring web content into Markdown apps like Obsidian with its structure intact.

Documentation teams

Docs teams convert help-centre articles into Markdown files.

Convert the other direction

Examples

HTML to Markdown Converter examples

4 worked examples

01

Bold text and a link

Convert <p>This is <strong>important</strong>: <a href="https://example.com">visit</a></p> to get "This is **important**: [visit](https://example.com)", with inline formatting mapped straight to Markdown syntax.

02

Nested list

Convert <ul><li>Fruit<ul><li>Apple</li></ul></li></ul> to get a "* Fruit" line with "* Apple" indented four spaces beneath it, preserving the nesting.

03

A table loses its grid

Convert a <table> with headers A and B and one row 1 and 2, and you get A, B, 1 and 2 as separate lines of text — Turndown has no Markdown table syntax, so rebuild the table by hand or with the Markdown Table Generator.

04

A code block

<pre><code>let x = 1;</code></pre> converts to the line " let x = 1;" — indented four spaces, the classic Markdown code block.

FAQ

Frequently asked questions

Quick answers to common questions about the HTML to Markdown Converter.

How do I convert HTML to Markdown?

Paste your HTML above and click "HTML → Markdown". The converted Markdown appears in the output box — everything runs in your browser, using the Turndown library.

Does it handle tables and nested lists correctly?

Nested lists convert properly, with * bullets and each level indented four spaces. Tables don't: Turndown on its own has no table syntax, so each cell comes out as its own line of plain text. Rebuild tables with the Markdown Table Generator.

Will inline styles or classes carry over into the Markdown?

No. Markdown has no concept of CSS classes or inline styles, so those are dropped; only structural formatting Markdown actually supports (headings, bold, italic, links, images, lists and code) is preserved.

Is this HTML to Markdown converter free?

Yes. It's free, with no sign-up and no limit on how much you convert.

Can I convert Markdown back to HTML?

Yes — the same tool handles both directions. Click "Markdown → HTML" instead, or use the dedicated Markdown to HTML converter page.

Is my HTML sent anywhere when I convert it?

No. The conversion runs directly in your browser — nothing is uploaded to a server.

Why are code blocks indented instead of using ``` fences?

Turndown writes code blocks in the classic indented style, where every line starts with four spaces, which all Markdown renderers understand. Switch to fenced ``` blocks by hand if your platform needs a language label for syntax highlighting.

What happens to scripts, styles and strikethrough?

Strikethrough tags such as <del> lose their formatting and only the text is kept. The contents of <script> and <style> tags come through as plain text, so delete those elements from the HTML before converting.

Why do some headings use === and --- underlines?

Turndown writes level-1 and level-2 headings in setext style — underlined with = or - signs — and levels 3 to 6 with # marks. Both styles are valid Markdown and render the same as # and ## headings.

Still have a question? Contact us

Report a problem

HTML to Markdown Converter

What went wrong?
    or paste a screenshot