HTML to Markdown

Convert HTML to Markdown.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Paste HTML and get Markdown back. Headings become # lines, strong and em become ** and _, links and images use Markdown syntax, and code blocks are fenced. Tables are not converted.

How to use

1
Step 1
Paste your HTML.
2
Step 2
Press Run.
3
Step 3
Copy the Markdown.

How it works

The HTML is parsed in your browser and converted with the Turndown library using ATX headings (# style) and fenced code blocks. Unordered lists use a * bullet followed by three spaces. Elements Turndown does not know, such as tables, are reduced to their text.

Worked example

A small article

Input
<h1>Title</h1><p>Some <strong>bold</strong> and <a href="https://x.io">link</a></p><ul><li>a</li><li>b</li></ul>
Output
# Title Some **bold** and [link](https://x.io) * a * b
Walkthrough
The h1 becomes #, strong becomes **bold**, the anchor becomes [link](url) and the list items become bullets.

Limitations

  • HTML tables lose their structure; only the cell text is kept. Convert tables separately.
  • Classes, styles and scripts are dropped.
  • List bullets use * with three spaces; reformat if your linter wants -.

Questions

How do I convert HTML to Markdown?
Paste the HTML and press Run. The Markdown appears in the output box.
Does it convert tables?
No. Table markup is reduced to text, so rebuild tables with the Markdown table generator.
Are images kept?
Yes, an img tag becomes ![alt](src).
Why are bullets written as * instead of -?
That is Turndown's default bullet style.

Features

  • ATX headings
  • Fenced code blocks
  • Links and images
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • TypeScript in 100 Seconds

    Fireship

    Typed JS snippets often get formatted or hashed nearby.

    Watch on YouTube
  • Learn JSON - Full Crash Course

    freeCodeCamp.org

    JSON is the payload format behind many developer tools here.

    Watch on YouTube