1. Home
  2. Blog
  3. How to Convert Markdown to HTML (with a Cheat Sheet)
Markdown Toolkit

How to Convert Markdown to HTML (with a Cheat Sheet)

Published 2 November 2026 · 6 min read

Markdown lets you write formatted text with plain characters: **bold**, # Heading, - list item. It’s what README files, notes apps, wikis and many chat tools use. But a website, a newsletter or a content management system usually wants HTML. Converting takes a second, as long as you know what you get.

This guide shows what each piece of Markdown becomes and how to convert with the free Markdown to HTML converter, including tables, task lists and safe output.

What Markdown turns into

Every Markdown mark has a matching HTML tag:

MarkdownHTML
# Heading<h1>Heading</h1>
## Smaller heading<h2>Smaller heading</h2>
**bold**<strong>bold</strong>
*italic*<em>italic</em>
[text](https://example.com)<a href="https://example.com">text</a>
![photo](photo.jpg)<img src="photo.jpg" alt="photo">
- item<ul><li>item</li></ul>
1. item<ol><li>item</li></ol>
`code`<code>code</code>
> quote<blockquote><p>quote</p></blockquote>
~~gone~~<del>gone</del>

A short example. This Markdown:

# Opening hours

We are open **Monday to Saturday**. Visit [our shop](https://example.com).

- Books
- ~~Magazines~~ Comics

becomes this HTML:

<h1 id="opening-hours">Opening hours</h1>
<p>We are open <strong>Monday to Saturday</strong>. Visit <a href="https://example.com">our shop</a>.</p>
<ul>
<li>Books</li>
<li><del>Magazines</del> Comics</li>
</ul>

Each paragraph is wrapped in <p>, the list items in <li>, and the heading gets an ID (opening-hours) so other pages can link straight to it.

How to convert Markdown to HTML

  1. Open the Markdown to HTML converter and paste your Markdown into Markdown input. You can also click Open file or drop a .md file onto the box. Sample loads an example.
  2. Choose the options (explained below). The defaults suit most people: GitHub-flavoured Markdown, IDs on headings, unsafe HTML removed.
  3. Click Convert to HTML. Check the result under Preview, switch to HTML to see the code, then Copy it or Download it as an .html file.

The options

  • GitHub-flavoured. Adds what standard Markdown lacks: tables, task lists (- [x] Done), ~~strikethrough~~ and web addresses that turn into links on their own. Keep it on unless your Markdown comes from a strict CommonMark tool.
  • Line breaks as typed. In standard Markdown, a single line break is ignored: two lines become one paragraph, and only a blank line starts a new one. With this option on, every line break becomes <br>, as in GitHub comments. Useful for addresses and poems.
  • IDs on headings. Gives every heading an id such as opening-hours, so links like #opening-hours jump to it. Repeated headings get -1, -2, exactly as on GitHub.
  • Complete HTML page. Wraps the result in a whole document with a title (taken from the first heading) and simple, readable styles, ready to open in a browser. Leave it off to paste the content into your own page or CMS.
  • Remove unsafe HTML. See the next section.

Why “Remove unsafe HTML” matters

Markdown may contain raw HTML, and HTML can run code. All three lines below are valid Markdown:

<img src="photo.jpg" onerror="alert('Hi')">
<script>stealCookies()</script>
[Click me](javascript:alert('Hi'))

Put that on your website and the script runs for every visitor. With Remove unsafe HTML on (the default), scripts, event handlers like onerror and javascript: links are removed, while ordinary HTML such as <b> or <br> stays. Only turn it off for Markdown you wrote yourself. The preview is always cleaned, whatever you choose.

One more privacy detail: pictures from other websites aren’t loaded in the preview; they show as a labelled box. They stay in the HTML and appear normally wherever you publish it.

More Markdown tools

Is my text uploaded?

No. The conversion runs in your browser, so your Markdown never leaves your device.

Frequently asked questions

Does it work with README files from GitHub?

Yes. Keep GitHub-flavoured on and the tables, task lists and code blocks come out as on GitHub. Code blocks keep their language as a class, such as language-js, for syntax highlighters.

Can I use my own styles?

Yes. Without Complete HTML page you get plain HTML that takes on your website’s styles. With it, replace the small <style> block in the head with your own stylesheet.

How do I write a line break without a new paragraph?

End the line with two spaces or a backslash, or turn on Line breaks as typed.