2026-10-03

An HTML to Markdown Converter That Runs in Your Browser (Both Directions, No Upload)

Moving content between a CMS, a docs site, a wiki and a code repository usually means turning HTML into Markdown or the other way round. iLoveDevTools's HTML to Markdown converter does both in a browser tab. This post covers what it converts, what is inevitably lost, and when a command-line tool is the better fit.

What it does

HTML to Markdown. Paste HTML, or copy text from a web page and paste it, and you get Markdown with headings, bold and italic text, links, images, nested and numbered lists, task-list checkboxes, blockquotes, fenced code blocks and GFM tables. A code block with a class such as language-js becomes a fence tagged js, and table alignment is carried over. You can choose the list marker, the italic style and whether images are kept.

Markdown to HTML. Paste GitHub-flavored Markdown and get HTML source, with a Preview tab that renders it in a sandboxed frame. An option, on by default, strips script and iframe elements, event handlers and javascript: links from the generated HTML.

A Use as input button sends the result back through the converter in the other direction, which is a quick way to see whether a page survives a round trip.

What is lost

Markdown is simpler than HTML, so some things cannot come across. Colors, fonts, inline styles, classes, ids, merged table cells and tables nested inside cells are dropped, and elements such as forms, buttons, SVG and iframes are removed. A table with no header row gets its first row used as the header, because GFM tables need one. Characters that Markdown would misread, such as asterisks and a line starting with a hash, are escaped so the text means what it did before. If a page depends on its layout, expect to tidy the result by hand.

Privacy

The HTML is parsed with the browser's DOMParser into an inert document, so scripts in pasted content are not run, and the conversion happens in the tab. The only download is the Markdown renderer script, fetched from a CDN the first time you use Markdown to HTML; your text is not sent with it. That makes it suitable for internal documentation or drafts you would rather not paste into a website that processes text on a server.

How it compares

Pandoc and command-line converters. Pandoc and similar tools handle many more formats, can be scripted over thousands of files and give you fine control over the output flavor. If you are migrating a whole site or converting in a build pipeline, use one of them. This tool is for the one-off job where installing something is more effort than the conversion.

Editor and CMS export features. Some editors and publishing platforms can export Markdown directly. If yours does, that is usually the most faithful route for its own content. This tool helps when you have raw HTML, copied web content or a snippet from somewhere without an export button.

Other online converters. They cover the same basic task. The questions to ask are whether the conversion happens in the browser or on a server, whether tables and nested lists survive, and whether the preview can run scripts. Here the first runs locally and the preview is sandboxed.

Verdict

For a quick, private conversion of a page, a snippet or a draft in either direction, try the HTML to Markdown converter. To check how the Markdown renders, use the Markdown Previewer, and to turn it into a document, Markdown to PDF does that.

Try HTML to Markdown · More guides · All tools