HTML to Markdown
Convert HTML to Markdown.
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
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?
Does it convert tables?
Are images kept?
Why are bullets written as * instead of -?
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 YouTubeLearn JSON - Full Crash Course
freeCodeCamp.org
JSON is the payload format behind many developer tools here.
Watch on YouTube
- MDN Web Docs
MDN
Primary reference for web APIs these developer tools touch.
- Introduction to JSON Web Tokens
jwt.io
JWT structure for decoder and debugger pages.