Markdown to HTML Converter
This Markdown to HTML converter turns Markdown into clean HTML as you type. Copy the HTML for a web page, email template or CMS, or download a complete page with a built-in style sheet. Tables, checklists and the rest of GitHub Flavored Markdown are supported.
- Live preview
- GitHub Flavored Markdown
How to convert Markdown to HTML
The HTML updates as you type.
-
Paste your Markdown
Paste it into the box or open a .md file.
-
Choose the output
HTML for a page gives the body only, for a CMS or template. Complete page with CSS adds the head, a title and a style sheet. Turn Heading IDs on to link to sections.
-
Copy or download
Click Copy HTML, or Download .html for a page you can open in any browser. Switch to Preview to see it rendered.
The sample report becomes an h1, two h2s, a ul, an ol, a table whose number columns keep style="text-align:right", a blockquote and a pre block with class="language-sql".
Markdown to HTML cheat sheet
What each piece of Markdown becomes.
| Markdown | HTML |
|---|---|
# Heading | <h1>Heading</h1>, or <h1 id="heading"> with Heading IDs on |
**bold**, *italic*, ~~strike~~ | <strong>, <em>, <del> |
| Inline code | <code>code</code> |
| Code fenced as js | <pre><code class="language-js"> |
[text](https://…) | <a href="https://…">text</a> |
 | <img src="pic.png" alt="alt"> |
- item and 1. item | <ul><li> and <ol><li>; a list that starts at 3 gets start="3" |
- [x] done | <li class="task-list-item"> with a disabled, ticked checkbox |
| A table | <table> with <thead> and <tbody> |
> quote | <blockquote> |
--- | <hr> |
$x^2$ | <span class="math math-inline">\(x^2\)</span>, ready for MathJax or KaTeX |
Body HTML or a complete page
HTML for a page is just the content, for a WordPress Custom HTML block, a CMS field, an email template or your own layout. It has no inline styles, so your site’s CSS decides how it looks.
Complete page with CSS is a whole document: the doctype, a UTF-8 charset, a mobile viewport, a title taken from the first heading, and a style sheet with readable type, a 780 px column, bordered tables and shaded code blocks. Download it and open it in any browser.
Safe links and HTML
- Links and images keep web, email and phone addresses and links within the page. Addresses that run code, such as javascript: links, are dropped.
- HTML written inside the Markdown, such as
<details>or<kbd>, is kept in the HTML output as it was. The preview leaves it out. - Text is escaped, so a
<or&in your writing can’t break the page.
Markdown to HTML Converter FAQ
Is the HTML output clean?
Yes. It uses plain tags with no inline styles and no wrapper divs. The only classes are for code languages, checklists and math.
Does it support GitHub Flavored Markdown?
Yes: tables with alignment, checklists, strikethrough and bare links that become links automatically.
How do I use the HTML in WordPress?
Add a Custom HTML block, or switch the editor to Code editor, and paste the HTML for a page.
What are heading IDs for?
An ID lets you link to a section, such as yourpage.html#next-steps. With Heading IDs on, each heading gets one made from its text.
Does HTML inside my Markdown stay?
Yes, in the HTML output. It’s left out of the preview, which only shows Markdown formatting.
Is my Markdown uploaded?
No. The conversion runs in your browser, on this page, so your text is never sent to a server or saved. Closing the page clears it.
More markdown converters tools
- Convert Markdown to Rich Text Converter Copy Markdown as formatted text for email, Word and other editors. Open tool
- Convert Markdown to PDF Converter Turn Markdown into a formatted PDF, with tables, code blocks and links. Open tool
- Clean Remove Markdown Strip Markdown symbols and keep clean, readable plain text. Open tool
- Convert Markdown to Word Converter Convert Markdown to an editable Word document with real heading styles. Open tool