HTML to Markdown
Convert HTML into clean, configurable Markdown with live preview, GFM tables/task lists, HTML validation, and stats — entirely in your browser.
Loading tool…
HTML and Markdown, and why you would convert
Markdown is a lightweight plain-text syntax created by John Gruber in 2004, designed so that a document reads naturally even before it is rendered: asterisks for emphasis, hashes for headings, hyphens for lists. It has become the default writing format for developers — README files, documentation sites, static blogs, wikis, and issue trackers all speak it.
HTML is far more expressive, which is what makes the conversion lossy by nature. Headings, paragraphs, links, images, lists, code blocks, blockquotes, and tables all have clean Markdown equivalents. Inline styles, classes, layout divs, and scripts do not, and are either dropped or preserved as raw HTML, since Markdown permits embedded HTML. Knowing that in advance sets the right expectation: you get the content and its structure, not the visual design.
Why we built this tool
The usual job is rescuing content from a page — moving a published article into a documentation repository, importing an old CMS export into a static site generator, or cleaning something pasted out of a word processor into publishable text.
Drafts, internal documentation, and client content are all things you would rather not upload to an unknown converter. Our tool parses the HTML with the browser's own DOM parser and walks the tree to emit Markdown, entirely on your device. No upload, no size limit, no retention — and it works offline once the page has loaded, which suits the batch-conversion sessions this task usually turns into.
Tips and common mistakes
- Tables and nested lists are where converters differ most — check those first in the output.
- Inline styles, classes, and layout wrappers have no Markdown equivalent and will be dropped.
- Convert relative image and link paths to absolute ones if the content is moving to a different site.
- Markdown permits embedded HTML, so keep raw markup for anything the syntax cannot express.
Open HTML to Markdown with a link
HTML to Markdown can be handed its input by the link that opens it, so the page arrives with the work already done. This is meant for assistants and scripts: if a chatbot, an editor extension, or a command-line agent already holds your content, it can build a link instead of asking you to copy and paste into a box.
The payload rides in the fragment — the part of a URL after the #. Browsers never send the fragment to a server, so anything handed over this way stays on your device exactly as a dropped file would. A link that uses the query string instead is rewritten into the fragment by the page before any analytics or ad script can read the address.
Prefix any field with gz — #gztext= — to pass it as gzip-compressed base64url, which fits roughly five to ten times more into the same link. Links stay reliable up to about 8,000 characters; past that, chat apps and address bars start truncating them, and the page says so rather than loading half a document.
One exception to the privacy rule: ?url= tells the page to download the input from an address. That request goes from your browser straight to that server — not through ours — but it does leave your device, and it only works if the server allows cross-origin requests.
#text=— the text to work on#html=— the HTML
Example: https://mygadgets.ink/tools/html-to-markdown/#text=...&html=...
Quick start: using HTML to Markdown
- Paste the HTML you want to convert into the input above.
- Run the conversion and read the Markdown output.
- Check tables, nested lists, and code blocks first — those are where converters differ most.
- Clean up any leftover raw HTML you do not need.
- Copy the Markdown into your repository or CMS.
Going the other way is Markdown to HTML, and Remove Formatting strips a document down to plain text.