Skip to content

Markdown to HTML Converter - Convert Markdown to Clean HTML

Markdown

Turn Markdown into HTML you can paste anywhere

Type or paste Markdown on the left. The HTML Code tab shows the markup to copy into a CMS, an email template or a static page, and the Preview tab shows how it renders. It uses marked with GitHub Flavoured Markdown turned on, then cleans the result with DOMPurify.

Example

## Install
Run `npm i` first.
- [x] tables
- [ ] ~~old flag~~

becomes

<h2>Install</h2>
<p>Run <code>npm i</code> first.</p>
<ul>
<li><input checked="" disabled="" type="checkbox"> tables</li>
<li><input disabled="" type="checkbox"> <del>old flag</del></li>
</ul>

Things to know

  • A single line break becomes <br>, as in GitHub comments. Standard Markdown would join the lines into one paragraph, so leave a blank line between paragraphs if the HTML is going somewhere that matters.
  • Raw HTML in your Markdown is allowed, but DOMPurify removes <script>, onclick and other event attributes, and javascript: links.
  • Headings do not get id attributes, so add them yourself if you need anchor links.

To read a document rather than extract its HTML, the Markdown preview is simpler.

Related Tools

Frequently Asked Questions

Which Markdown features are supported?
CommonMark plus GitHub Flavoured Markdown: tables, task lists, ~~strikethrough~~, fenced code blocks and bare URLs turned into links. Single line breaks become <br>, as on GitHub. Footnotes and math blocks are not supported.
Is the HTML safe to embed?
The output goes through DOMPurify, which removes script tags, inline event handlers such as onclick and javascript: URLs while keeping normal formatting tags. That makes it safe to drop into a page you control. If you store user-submitted Markdown, sanitise it again on the server too.
Does it add syntax highlighting to code blocks?
No. A fenced block with a language, such as ```js, becomes <pre><code class="language-js">, which highlighters like Prism or highlight.js pick up when you add them to your page.
Is my Markdown sent anywhere?
No. Conversion and sanitising both run in your browser.