Developer

HTML to Markdown converter

Paste an HTML fragment and the tool writes the Markdown equivalent as text you can copy, with tags turned into headings, links, lists and code blocks.

Runs locally in your browser

How it works

The HTML is parsed with the browser's DOMParser into a separate, inert document, so scripts in the input never run and images never load. Elements are then walked in order and each one is translated: headings become hash marks, strong and bold become double asterisks, italics become single asterisks, links become brackets with the address in parentheses, images become an exclamation mark and alt text, lists become dashes or numbers, quotes get a leading angle bracket and pre blocks become fenced code. Attributes other than a link or image address are dropped because Markdown has nowhere to put them. Whitespace is collapsed, then blank lines are normalised so the output reads as Markdown rather than a wall of text.

Worked example

For <h2>Notes</h2><p>Hello <strong>world</strong> and <a href="https://YOURDOMAIN.com/x">link</a>.</p><ul><li>One</li><li>Two</li></ul> the output is four blocks: ## Notes, then Hello **world** and [link](https://YOURDOMAIN.com/x)., then a bullet for One and a bullet for Two. The heading level comes from the h2 tag, the bold text is wrapped in double asterisks, and the link keeps both its label and its address.

Questions and answers

Everything runs in your browser: your text, file or value is never uploaded anywhere.