Convert Markdown to HTML

Turn Markdown into HTML code.

Markdown to HTML

0 lines · 0 characters

0 lines · 0 characters

Results update as you type.

Runs in your browser. Nothing uploaded.

How to convert Markdown to HTML

  1. Paste your Markdown into Markdown. The HTML appears as you type.
  2. Leave GitHub style on if your Markdown has tables, task lists or strikethrough. Tick Single line breaks become <br> to keep every line break as it is.
  3. Click Preview to see the page rendered, then copy the HTML or download it as document.html.

What each piece of Markdown becomes

Markdown HTML
# Title <h1>Title</h1>
**bold** and *italic* <strong>bold</strong> and <em>italic</em>
[text](url) <a href="url">text</a>
- item and 1. item <ul><li> and <ol><li>
> quote <blockquote>
A fenced block starting with ```js <pre><code> with a language-js class
- [x] done A list item with a disabled, ticked checkbox
~~old~~ <del>old</del>

Characters like < and & in normal text and code blocks are escaped, so they show up as written instead of being read as HTML.

Before you publish the HTML

  • Sanitize anything you didn’t write. Raw HTML in the Markdown comes through as it is.
  • Add your own heading IDs. Headings come out without id attributes, so add them if you want links that jump to a section.
  • Add a highlighter for code. Code blocks get a language class but no colors. A library such as Prism or highlight.js reads that class and colors the code.
  • Task list boxes can’t be ticked. They come out disabled, because they show the state written in the Markdown.