Markdown to HTML converter
Paste Markdown and get clean, sanitized HTML: a fragment to drop into a CMS or a complete web page. Tables, highlighted code, maths and Mermaid diagrams are converted too, all in your browser.
- 100% free
- Runs in your browser
- No uploads
- Runs on your deviceEvery tool works directly in your browser. No files are uploaded.
- Your privacy mattersYour files never leave your device, so there's nothing for us to store.
- No limitsUse any tool as much as you need. No daily caps, no waiting.
- Completely freeNo signup and no trial to cancel. Ads keep the tools free.
How to convert Markdown to HTML
- Paste your Markdown. The HTML updates a moment after you stop typing.
- Choose the output. HTML fragment for pasting into another page, or Full page for a file that opens on its own.
- Choose how diagrams are written. Inline SVG works anywhere; Keep as code suits sites that run Mermaid.
- Copy or download. Switch the right pane to Preview to check the result before you use it.
What the HTML looks like
| Markdown | HTML |
|---|---|
## Setup | <h2 id="setup">Setup</h2> |
**bold** and ~~old~~ | <strong>bold</strong> and <del>old</del> |
- [x] Done | <li><input checked disabled type="checkbox"> Done</li> |
| A table | <table> with <thead>, <tbody> and text-align for aligned columns |
```js code | <pre><code class="language-js"> with colour spans |
$x^2$ | <math> (MathML) |
Try it with an example
The example document uses every feature: a table with aligned columns, a checklist, a formula, a Mermaid Gantt chart, code and a footnote. Load it, switch between fragment and full page, and look at the Preview to compare.
Tips and common problems
- HTML you wrote is missing. Script, style, iframe and form tags are removed on purpose. Add styles in your site's stylesheet instead.
- Code has no colours on your site. The colours come from classes such as
hl-k(keywords) andhl-s(strings). The full-page output includes them; for a fragment, copy those few rules into your CSS. - Line breaks disappear. In Markdown a single line break joins lines. Leave a blank line for a new paragraph, or end a line with two spaces for a break.
- Going the other way? HTML to Markdown turns web pages and rich text back into Markdown.
Frequently asked questions
Is the HTML safe to paste into my website?
It's sanitized: scripts, event handlers such as onclick, javascript: links, iframes, forms and <style> blocks are removed, even if they were in the Markdown. Ordinary HTML like <details>, <kbd> or <sup> is kept. You still decide where the HTML goes, so review it as you would any content.
What's the difference between a fragment and a full page?
A fragment is just the content (<h1>, <p>, <table> and so on) for pasting into a CMS, an email template or another page that already has its own <head> and styles. A full page adds <!doctype html>, a title from your first heading and, if you tick it, a small stylesheet, so the file opens nicely on its own.
How are maths formulas converted?
To MathML, which modern browsers display without any extra library or font files. That keeps the HTML self-contained. If your site already uses KaTeX or MathJax you can keep the TeX in the Markdown and let your site render it instead.
What happens to Mermaid diagrams?
With Inline SVG they're drawn here and inserted as SVG images that work anywhere. With Keep as code each one becomes <pre class="mermaid">, the format Mermaid's own script looks for, for sites that load Mermaid themselves.
Do headings get ids for links?
Yes, GitHub style: "## Getting started" becomes <h2 id="getting-started">, and a repeated heading gets -1, -2 added. Footnotes link to their notes and back.