Markdown to HTML converter

Paste Markdown, get clean HTML. Choose a fragment for your CMS or a complete page you can open anywhere.

How Markdown becomes HTML

Every Markdown construct maps to one HTML element. The converter here uses markdown-it, a CommonMark-compliant parser, with the same GitHub Flavored Markdown extensions GitHub applies to READMEs.

MarkdownHTML
# Title<h1 id="title">Title</h1>
**bold** / *italic*<strong> / <em>
[text](url)<a href="url">text</a>
![alt](img.png)<img src="img.png" alt="alt">
- item<ul><li>item</li></ul>
```js fenced code<pre><code class="language-js">
> quote<blockquote>
GFM table<table><thead>…<tbody> with text-align from the colons
~~gone~~<s>gone</s>

When to use a fragment or a full page

Paste a fragment into WordPress (Code editor), Ghost’s HTML card, an email template or a Jinja/Handlebars layout that already has its own styles. Download a full page when you want a standalone file to email, archive or host: it includes a title and a small, readable stylesheet.

Raw HTML inside Markdown

Markdown lets you mix in HTML, for example <details> or <kbd>. That HTML passes through. With Sanitize on, anything risky like <script> or onclick is removed, which is what you want for content from other people.

Need the other direction? Use HTML to Markdown.

Questions people ask

How do I convert Markdown to HTML?
Paste or open your Markdown on the left. The HTML appears on the right as you type; copy it or download it as an .html file.
What is the difference between a fragment and a full page?
A fragment is just the body markup, ready to paste into a CMS or template. A full page adds <!doctype>, <head>, a title from your first heading and optional readable CSS, so it opens nicely on its own.
Is the HTML safe to paste into my site?
With “Sanitize” on, the output passes through DOMPurify, which removes scripts, event handlers and other active content that raw HTML in Markdown could carry.
Which Markdown features are converted?
CommonMark plus GFM tables, task lists, strikethrough and autolinks, footnotes, emoji shortcodes and heading ids for anchor links.

Related tools