Markdown to HTML Converter
Convert Markdown to HTML and back, with a live preview.
GitHub Flavored Markdown — tables, fenced code, task lists and strikethrough are all supported. The preview is sanitised before rendering, but the HTML output is raw: if you publish it on your own site, sanitise it there too.
About this tool
Write Markdown and get clean HTML out, or paste existing HTML and convert it back to Markdown. A rendered preview sits alongside the source so you can see the result as you type.
How to use it
- Choose Markdown to HTML, or HTML to Markdown.
- Paste or write your content.
- Switch between the code output and the rendered preview.
Which Markdown this is
Markdown has no single specification. The original 2004 implementation left many cases undefined, and different parsers resolved them differently — which is why the same document can render three ways.
This uses GitHub Flavored Markdown, built on CommonMark. That gives you:
- Tables with pipe syntax
- Fenced code blocks with language hints
- Task lists —
- [ ]and- [x] - Strikethrough with
~~text~~ - Autolinking of bare URLs
CommonMark settled the ambiguous cases, so nested lists, emphasis inside words and mixed indentation behave predictably.
Not included, because they are extensions specific to other tools: footnotes, definition lists, math blocks, admonition callouts, and front matter. If your document uses those, they will appear as literal text.
Round-tripping loses formatting, not meaning
Converting Markdown to HTML and back does not return the original file. The meaning survives; the styling choices do not.
Markdown offers several ways to write the same thing — *emphasis* or _emphasis_, # headings or underlined Setext headings, - or * for bullets. HTML has one representation for each, so converting back produces the converter's preferred style rather than yours.
Other things that change:
- Hard line breaks within a paragraph may be reflowed
- Reference-style links become inline links
- HTML blocks embedded in Markdown come back as raw HTML
If you are converting a document you intend to keep editing, treat the output as a new file rather than an update to the original.
One safety note: the preview is sanitised before rendering, but the HTML output is raw. If you publish it somewhere, sanitise it there too.
Frequently asked questions
- Which Markdown flavour?
- GitHub Flavored Markdown — tables, fenced code blocks, task lists, strikethrough and autolinking all work as they do in a README.
- Is the HTML output sanitised?
- The preview escapes raw HTML so pasted content cannot execute scripts in this page. If you render the output on your own site, sanitise it there too.
- Is my draft content private?
- Yes. Conversion and preview both happen in your browser, so unpublished drafts and internal documentation stay on your device.