Markdown ↔ HTML Converter

Both directions, without installing anything.

—

What is supported

Headings, bold and italic, inline code, fenced code blocks, unordered and ordered lists, blockquotes, links, images, horizontal rules, and pipe tables. Nested lists are handled to a reasonable depth. Unsupported: footnotes, definition lists, task list checkboxes beyond a basic conversion, and arbitrary inline HTML in the Markdown-to-HTML direction. For production pipelines, a full CommonMark or GFM parser is the right choice — this tool is for quick one-off conversions.

Markdown is not one standard

The original Markdown specification was deliberately ambiguous, and every implementation filled the gaps differently. CommonMark was created to fix that and is now the reference most tools follow. GitHub Flavored Markdown adds tables, task lists, autolinks and strikethrough on top. As a result, the same document can render differently in different places: tables may or may not work, single newlines may or may not create line breaks, and list spacing rules vary. If a conversion looks wrong, check which flavour the destination expects.

Escaping and safety

Converting Markdown to HTML for display requires care. If the Markdown comes from users, the resulting HTML can contain scripts, event handlers and other injection vectors. Any real pipeline needs a sanitiser that strips dangerous tags and attributes — never insert generated HTML into a page with innerHTML without that step. In the other direction, converting HTML to Markdown needs to escape characters that have meaning in Markdown, such as asterisks and underscores appearing in ordinary text, or they will be reinterpreted as emphasis.

Why convert at all

Markdown and token cost

The same document costs noticeably more tokens as HTML than as Markdown, because tags repeat and add characters that carry no information. If you are sending documents to a language model, stripping HTML first reduces cost and usually improves comprehension, since the model spends less of its attention on markup. Convert to Markdown, remove decorative markup such as nested layout divs, then check the size with the token counter. For structural clean-up before conversion, use the regex tester.