Markdown to HTML Converter

This Markdown to HTML converter gives you the HTML code for your Markdown, formatted and ready to paste into a CMS or template. It supports GitHub-flavored tables, task lists, and fenced code, and removes anything unsafe.

Updated
Runs in your browser. Your text is not uploaded.
The HTML is cleaned with DOMPurify, so scripts and event handlers are removed.

How to use the Markdown to HTML Converter

  1. Write or paste Markdown, or upload a .md file.
  2. Choose the options: heading ids, links in a new tab, a full HTML document, or line breaks as <br>.
  3. Copy or download the HTML. The preview shows how it renders.

How it works

The Markdown is parsed by marked with GitHub-flavored rules, then cleaned by DOMPurify, which removes scripts, event handlers, and other unsafe markup. The result is pretty-printed with js-beautify. Heading ids are made from the heading text, lower-cased with spaces turned into hyphens, and numbered when two headings match.

Examples

  • # Hello → <h1 id="hello">Hello</h1>.
  • **bold** → <strong>bold</strong>.
  • - [x] Done → a list item with a checked checkbox.

Markdown and the HTML it becomes

MarkdownHTML
# Title<h1>Title</h1>
**bold**<strong>bold</strong>
_italic_<em>italic</em>
[link](https://example.com)<a href="https://example.com">link</a>
- item<ul><li>item</li></ul>
`code`<code>code</code>
> quote<blockquote><p>quote</p></blockquote>

Preview or code?

If you want to see how Markdown looks while you write, use the Markdown Preview tool. This converter is for when you need the HTML itself, for example to paste into an email template or a CMS that doesn't accept Markdown.

Limitations

  • Raw HTML in the Markdown is kept only when DOMPurify considers it safe.
  • Math and diagram extensions (such as LaTeX or Mermaid) are not rendered.

Frequently asked questions

How do I convert Markdown to HTML?

Paste the Markdown and copy the generated HTML. Turn on "Full HTML document" for a complete page.

Is the output safe to use on my site?

Yes. It is sanitized with DOMPurify, so scripts and event handlers are removed.

Does it support tables?

Yes. GitHub-flavored tables, task lists, strikethrough, and fenced code blocks are supported.

Often used together with the Markdown to HTML Converter.