Markdown ↔ HTML Converter
Convert Markdown to HTML or HTML back to Markdown, with a live preview.
Preview
HTML output
About this tool
Markdown is quick to write but eventually needs to become HTML, whether that's for a blog post, a static site, or an email, and the reverse comes up too: pasting in HTML from somewhere and wanting clean Markdown out. This tool converts in either direction as you type, with a live preview and a Swap button to flip which side is the source.
Markdown was created by John Gruber in 2004 as a way to write for the web using plain-text conventions people already used in email: asterisks for emphasis, hyphens for lists, a pound sign for a heading. It has since become the default writing format for README files, documentation, forums, note-taking apps, and static site generators. Because the original description left some edge cases ambiguous, different tools interpret it slightly differently, which led to standardization efforts like CommonMark and extended flavors like GitHub Flavored Markdown.
Typical uses for this converter: turning a Markdown draft into HTML to paste into a CMS or email template that doesn't accept Markdown, checking how a README will render before you commit it, or going the other way and turning HTML copied from a web page into clean Markdown for your notes or docs. If the output needs tables or nested lists, those are the two common features not covered yet, so format them by hand after converting.
Frequently asked questions
- Which Markdown syntax is supported?
- The common core: headings, bold, italic, inline code, fenced code blocks, links, images, ordered and unordered lists, blockquotes, and horizontal rules. It covers everyday Markdown rather than the full CommonMark specification (tables and nested lists aren't supported yet).
- Is raw HTML in my Markdown executed?
- No. Any HTML characters in your Markdown input are escaped before conversion, so pasting a stray < or a script tag renders as visible text in the output rather than being interpreted as markup.
- What about a script tag in the HTML → Markdown direction?
- The preview for pasted HTML runs inside a sandboxed iframe with scripting disabled, so nothing in your input can execute or reach the rest of the page, even while you're actively typing it.
- How does HTML → Markdown handle a tag it doesn't recognize?
- It uses the browser's built-in HTML parser (not a hand-rolled one, since HTML is genuinely hard to parse correctly), and any tag without a specific Markdown equivalent is unwrapped: its own text and children are kept, just without special formatting.
- Why does my line break disappear in the HTML?
- In Markdown, a single line break inside a paragraph is treated as a space, not a new line. That lets you wrap long paragraphs in your editor without affecting the output. To start a new paragraph, leave a blank line between the two blocks of text.
- What's the difference between Markdown and HTML?
- HTML is the markup language browsers actually render, with explicit opening and closing tags. Markdown is a simpler writing syntax designed to be readable as plain text, which then gets converted into HTML. Markdown covers the common formatting needs; HTML can express far more, which is why some HTML has no Markdown equivalent.