Markdown to HTML
Render Markdown as HTML
What is Markdown to HTML?
Render Markdown (GitHub-flavoured) as HTML in your browser, with optional HTML sanitisation via DOMPurify so pasted content is safe to drop into a live page. Toggle between rendered preview and raw HTML source. Great for turning a README into a web excerpt, previewing a blog post before publishing, or generating boilerplate HTML that you can further tweak.
How do I use Markdown to HTML?
- Paste Markdown into the input panel.
- Switch between Preview and HTML views.
- Toggle sanitise off (at your own risk) only if you trust the input to include raw HTML.
- Copy or download the output.
Markdown to HTML by the numbers
- Parser
- marked, CommonMark + GFM
- Sanitiser
- DOMPurify, always on
- Preserves
- Tables, code blocks, task lists, images
- Drops
- <script>, on* handlers, unsafe URIs
- Output
- HTML, ready to paste
Common use cases for Markdown to HTML
- Pasting formatted content from Notion into a WordPress post.
- Converting a README into a blog draft.
- Generating email-safe HTML from a text-only brief.
- Previewing a PR description before sending.
- Building a static page from notes without a generator.
Common pitfalls and how to avoid them
- Images stripped after paste — Some CMSes block external images by default. Upload the image separately and re-link it with the CMS media picker.
- Task lists render as plain bullets — Not every HTML context supports GitHub task-list markup. Keep the markdown for GitHub, and strip checkboxes for WordPress/Ghost.
- Custom HTML in the source is gone — DOMPurify strips scripts and event handlers. Structural tags survive — scripts do not. This is intentional.
When should I use Markdown to HTML?
Markdown to HTML is for the MD → HTML direction. For the reverse — pulling Markdown out of an existing HTML document — use HTML to Markdown.
What flavour of Markdown is supported?
CommonMark plus GitHub Flavored Markdown extras: tables, task lists, strikethrough, autolinks, and fenced code blocks.
Is the output HTML safe to paste into a CMS?
Yes — we pass the output through DOMPurify so scripts, event handlers, and dangerous attributes are stripped. Only clean semantic HTML remains.
Can I get the raw unsafe HTML?
No — sanitisation is always on. If you need raw output for a trusted pipeline, use a server-side Markdown converter instead.
Is my file uploaded anywhere?
No. Everything runs in your browser. Your files never leave your device, and there is no server component for this tool.