Two converters, two jobs
The tool runs both directions, and they serve different needs:
- Markdown → HTML — turn your
.mdcontent into ready-to-publish HTML for a website, email template, or CMS that expects HTML. This is the common, reliable direction. - HTML → Markdown — pull existing web content, documentation, or a pasted article into Markdown so you can version-control it, edit it plainly, or feed it to a Markdown-based pipeline. Useful, but expect to tidy the result.
What converts cleanly, and what doesn’t
| Element | MD → HTML | HTML → MD |
|---|---|---|
| Headings, bold, italic, links | ✅ | ✅ |
| Lists, blockquotes, code blocks | ✅ | ✅ |
| Tables | ✅ (GFM) | ✅ basic (alignment may drop) |
| Code language hint | ✅ language-x class | Often lost on the way back |
Nested <div>s, inline CSS, classes | passes through as raw HTML | flattened to text |
The pattern: semantic, standard elements round-trip well; presentational or deeply-nested HTML does not, because Markdown has no syntax for it.
Get the cleanest result
For HTML → Markdown, feed it semantic HTML — real <h2>, <p>, <ul>, <blockquote> elements rather than <div> soup with styling. Content from a well-structured article converts beautifully; a table-based email layout with inline styles converts poorly. Simplify the HTML first if you can.
For Markdown → HTML, write portable CommonMark + GFM (see the Markdown Preview tool to check your source renders the way you expect before converting), and remember that any raw HTML you embed in the Markdown comes through verbatim.
When to convert vs render live
If you just want to see Markdown rendered, a live previewer is simpler. Convert to HTML when you need the HTML as an artifact — to paste into a system that stores HTML, to email, or to commit as a build output. And whenever that HTML will display content you didn’t write, sanitize it first.