Markdown to HTML and Back: What Converts Exactly
Short answer: the Markdown ↔ HTML Converter converts Markdown to HTML or HTML back to Markdown as you type. It parses your text into a document tree instead of using search-and-replace, supports GitHub-style tables, task lists and strikethrough, and tells you plainly when something cannot be converted exactly. It also works as a Markdown previewer. Nothing is uploaded.
How the conversion works
Markdown is read by a CommonMark-style parser: lines are grouped into block quotes, lists, code blocks, tables and paragraphs, link reference definitions are resolved, and the text in each block is parsed for emphasis, links, images and code. The tree is written out as HTML.
In the other direction, a tolerant HTML parser understands void elements, optional end tags, comments and entities, and the tree is written out as Markdown with the escaping that keeps the result from being misread. Tables, task lists, strikethrough and bare web addresses follow GitHub Flavored Markdown.
What cannot be converted exactly
Markdown has no syntax for many HTML features, so the converter never drops them silently. The Warnings tab lists each case.
- Elements with no Markdown form (
details,kbd,sub,sup, an image with a width) are kept as HTML by default, and content inside a kept wrapper is still converted. - Tables with merged cells, or lists inside cells, stay HTML tables.
- Attributes such as
classandidcannot be written in Markdown and are dropped, with a count. - Scripts, styles, frames, forms and event handlers are removed and reported.
Options worth knowing
- Sanitize output and Raw HTML: keep, show as text, or remove. Use "Show as text" to see raw HTML in your Markdown as plain text instead of running it. Escaping is explained in HTML entities.
- Unsupported HTML: keep as HTML, or remove with a warning.
- Heading IDs, line breaks as
<br>, full document, indent HTML. - Markdown style for HTML → Markdown:
#or underline headings, bullet character, emphasis marker, line-break style, numbering and aligned table columns.
The preview is sandboxed
The Preview tab renders in a sandbox with scripts, forms and navigation disabled. Links are shown but do not open, and remote images are not loaded.
How to convert Markdown to HTML with the converter
- Open the Markdown ↔ HTML Converter.
- Pick the direction, or drop a
.mdor.htmlfile. - Set the options and read the Warnings tab.
- Copy or download the output. Send HTML to passes it to another tool such as the HTML Formatter.
Limits to know
- It is not a byte-for-byte match of any single reference implementation. Unusual edge cases can differ from GitHub, a static-site generator or your own Markdown library.
- Anything with no Markdown form needs a decision from you.
- Everything runs in your browser.
Frequently asked questions
How do I convert Markdown to HTML? Paste it into the input pane with Markdown → HTML selected.
Does it support GitHub tables and task lists? Yes, plus strikethrough and bare URLs.
What happens to HTML that has no Markdown form? It is kept as HTML or removed, and a warning says which.
Can I preview Markdown? Yes, in the Preview tab.
Is it safe to preview untrusted Markdown? The preview is sandboxed, but treat the HTML output with care.