Markdown ↔ HTML Converter
Convert Markdown source into real HTML markup, or paste HTML and get Markdown back out. Side by side, both directions, entirely in your browser.
Last updated
Direction
Options
How to convert Markdown to HTML
- Paste Markdown, or HTML to go the other way.
- Click Markdown → HTML or HTML → Markdown; tick GitHub extensions for tables and task lists.
- Click Copy above the result.
About this tool
This is a real two-way converter, not just a preview. In Markdown → HTML mode your Markdown is parsed by markdown-it, which follows the CommonMark specification exactly, so the HTML matches what GitHub, GitLab and other CommonMark-based sites produce. HTML inside the Markdown is kept, as on GitHub, but scripts, event handlers and javascript: links are stripped, so the output is safe to paste into a page.
In HTML → Markdown mode, pasted HTML — from a web page, a CMS or a Word export — is converted by Turndown, the library most Markdown editors use for pasting: headings, emphasis, links, images, nested lists, blockquotes and code blocks (keeping their language) all come through.
The GitHub extensions option adds pipe tables, ~~strikethrough~~, - [ ] / - [x] task lists, footnotes and automatic links for plain URLs in both directions; turn it off for strict CommonMark. Everything runs locally in your browser; nothing you paste is uploaded anywhere.
Questions about Markdown and HTML
Will the HTML match what GitHub shows?
Yes, for standard Markdown. It follows the CommonMark specification that GitHub, GitLab and others use, plus GitHub’s tables, strikethrough, task lists and footnotes.
How do I convert a web page or Word document to Markdown?
Copy the HTML (or paste content saved as HTML) and click HTML → Markdown. Headings, links, lists, images and code blocks come through.
Is the HTML safe to paste into my site?
Scripts, event handlers and javascript: links are stripped from the output.
What is Markdown?
A simple way to format text with symbols: # for headings, **bold**, *italic*, - for lists and [text](link) for links.