Home/Markdown ⇄ HTML
Text · MD

Markdown ⇄ HTML

Two-way conversion between Markdown and HTML

Input
MarkdownMD
Output
HTMLHTML

Overview: Markdown ⇄ HTML is a two-way converter that quickly renders Markdown into HTML and turns HTML back into concise Markdown. It is built on marked (Markdown parsing) and turndown (HTML → Markdown), follows the CommonMark specification, and supports the common elements you expect: code blocks, tables, images and more.

How to use: Step 1 — paste Markdown source on the left (supports headings, lists, bold, italic, links, code blocks, tables, and so on) or click Sample to load an example. Step 2 — the right panel shows the corresponding HTML in real time, ready to paste into an HTML editor, an email or a CMS. Step 3 — for the reverse direction, paste HTML on the right and the tool produces Markdown (ATX-style headings, fenced code blocks). Step 4 — copy or download the result.

Typical scenarios: Tech bloggers write in Markdown and export HTML to publish on a CMS; migrating legacy HTML sites to Markdown-based static generators (Hexo, Hugo, VuePress); convert between GitHub READMEs / wikis and their web versions; turn rich text from WeChat Official Accounts, Jianshu, Juejin, and so on into portable Markdown; format interoperability during collaborative document editing.

Technical notes: marked follows CommonMark plus GFM extensions and supports task lists, tables and strikethrough. turndown converts common HTML elements — <h1>-<h6>, <strong>, <em>, <ul>, <ol>, <code>, <pre>, <a>, <img> — to Markdown. Non-content elements such as <script> or <style> are safely stripped. Complex layouts with nested divs or inline styles may not survive perfectly and might need manual tweaks.

Privacy: All conversion happens locally in your browser and article content is never uploaded, so it is safe to use with unpublished blog posts or internal knowledge-base docs.

Frequently Asked Questions

How do I use Markdown ⇄ HTML?
Step 2 — the right panel shows the corresponding HTML in real time, ready to paste into an HTML editor, an email or a CMS. Step 3 — for the reverse direction, paste HTML on the right and the tool produces Markdown (ATX-style headings, fenced code blocks).
What can Markdown ⇄ HTML do?
Typical scenarios: Tech bloggers write in Markdown and export HTML to publish on a CMS; migrating legacy HTML sites to Markdown-based static generators (Hexo, Hugo, VuePress); convert between GitHub READMEs / wikis and their web versions…
Is my data private when I use Markdown ⇄ HTML?
Privacy: All conversion happens locally in your browser and article content is never uploaded, so it is safe to use with unpublished blog posts or internal knowledge-base docs. Privacy: All conversion happens locally in your browser and article content is never uploaded, so it is safe to use with unpublished blog…
What technical details should I know about Markdown ⇄ HTML?
Non-content elements such as <script> or <style> are safely stripped. Complex layouts with nested divs or inline styles may not survive perfectly and might need manual tweaks.