Black Friday: 50% off every paid plan with code BF50. Ends 5 December.

See prices

Free tool

Markdown to HTML, clean and live.

Paste or type Markdown and get tidy HTML as you write, with a preview beside it. Headings can get ids for links, tables keep their alignment, task lists keep their boxes, and code blocks keep their language for a highlighter. Copy the HTML into your site, email tool or CMS, or download a ready page with simple styles.

Need a custom tool, app or website? Contact us 
Markdown
HTML

Preview

Raw HTML inside the Markdown is left out, and links that would run code are blocked, so the result is safe to paste into a page.

Your text is converted in your browser and kept in this browser only.

What it understands

CommonMark, plus GitHub's extras.

01 / Text

The basics

Headings, paragraphs, bold, italics, links, pictures, quotes, rules and inline code.

02 / Lists

Nested and tasks

Bulleted and numbered lists inside each other, and - [ ] task items that become checkboxes.

03 / Extras

Tables and code

Pipe tables with left, centre or right columns, ~~strikethrough~~, and fenced code with its language.

Guide

How to convert Markdown to HTML, and paste it anywhere.

A Markdown to HTML converter turns the plain text shorthand of Markdown, like # Title and **bold**, into the HTML tags a web page uses, like <h1> and <strong>. You write in a format that is quick to type and easy to read, and paste the HTML into a site, a CMS, an email tool or a help centre. This converter follows CommonMark plus GitHub's tables, task lists and strikethrough, and shows the code and a preview as you type.

How to convert Markdown to HTML

  1. Type or paste Markdown into the left box, click Open file or drop a .md file on the box to load it, or click Example to see every feature at once. The example is there on your first visit; after that, the box keeps your last text.
  2. The HTML appears in the right box and the Preview below shows how it will look. The status line counts headings, paragraphs and links.
  3. Choose your options: Ids on headings for links to sections, Open web links in a new tab, and A whole page with simple styles if you want a complete document.
  4. Click Copy HTML to paste it into your editor or CMS, or Download .html to save a file.

Markdown and the HTML it becomes

You typeYou get
## What changed<h2 id="what-changed">What changed</h2>
**bold** and *italic*<strong>bold</strong> and <em>italic</em>
~~old price~~<del>old price</del>
[Docs](https://example.com)<a href="https://example.com">Docs</a>
![Logo](logo.png)<img src="logo.png" alt="Logo">
- [x] TestedA list item with a ticked, disabled checkbox
3. Third step as the first item<ol start="3">, so the count carries on
> A quote<blockquote> around the paragraph
Three backticks and js<pre><code class="language-js">
--- on its own line<hr>

A bare web address like https://example.com becomes a link by itself. To force a line break inside a paragraph, end the line with two spaces or a backslash. A single line break on its own is joined into the same paragraph, which is how Markdown is meant to work.

What each option does

  • Ids on headings. Each heading gets an id made from its text: lower case, punctuation removed, spaces turned into hyphens. "What's new?" becomes whats-new. If two headings have the same text, the second gets -2 on the end. Use these for a table of contents or a link like page.html#whats-new.
  • Open web links in a new tab. Adds target="_blank" rel="noopener" to links that start with http or https. Links to sections on the same page are left alone.
  • A whole page with simple styles. Wraps the HTML in a complete document with a doctype, a title taken from your first # heading, and a small stylesheet for readable text, tables and code. Leave it off when you paste into a CMS, which already has its own page and styles.

One thing to know: Download .html always saves a whole page, so the file opens nicely in a browser. It is named after the first heading, and the heading becomes the page title. Copy HTML gives you only the body unless the whole page option is ticked. The three switches are remembered in this browser.

Converting several files at once

Pick or drop more than one .md file and each is turned into its own whole web page, all in one ZIP named markdown-to-html.zip. Each page keeps the name of its file, with .html at the end, and uses the switches you have set. Your text in the box is left as it was.

What is left out on purpose

Raw HTML typed into the Markdown, like a <div> or a <script>, is dropped, and its text is kept. A <br> becomes a line break. Links that start with javascript: are replaced with #. That makes the output safe to paste into a page even when the Markdown came from someone else.

Reference-style links such as [text][1] with a line [1]: https://example.com somewhere else are turned into ordinary links, and footnotes are listed at the end. Maths, definition lists and raw HTML tags are not read. Raw tags are dropped on purpose, so the result is safe to paste. A code block inside a list item ends the list, so keep code blocks at the left edge.

Tips for clean HTML

  • Leave a blank line between blocks. A list or table straight after a paragraph line is still read, but a blank line makes your source easier to scan.
  • Give every picture alt text inside the square brackets. Screen readers read it out, and it shows if the picture fails to load.
  • Add the language after the opening backticks, like ```css, so a code highlighter on your site can colour it.
  • Use one # heading at the top and ## for sections. Many sites already put the page title in an h1.

Prefer to write with a preview beside you and save your work as you go? Try the Markdown editor. For a file you can print or attach, use Markdown to PDF.

Questions

Good to know.

Is the HTML safe to paste into my site?

Raw HTML tags in the Markdown are dropped and javascript: links are replaced, so the output holds only ordinary tags. Still check anything you did not write yourself.

Does it highlight code?

It adds the language as a class, such as class="language-js", which highlighters like Prism and highlight.js use. Add one of them to your page to colour the code.

What are heading ids for?

An id lets you link straight to a section, such as page.html#what-changed. Tables of contents use them.

Can I get a PDF instead?

Yes, with Markdown to PDF, which uses the same reader and lays the text out on pages.

Is my text uploaded?

No. It is converted in this tab and kept in this browser so it is still there next time.

Can I convert HTML back to Markdown?

Not with this tool, it only goes from Markdown to HTML. Keep your .md file as the source and convert again after each edit.

Will the HTML work in WordPress or another CMS?

Yes. Leave A whole page with simple styles off, copy the HTML and paste it into the editor's HTML or code view. The CMS theme then styles it.

Why did my line breaks disappear?

In Markdown, one line break inside a paragraph is treated as a space. Leave a blank line to start a new paragraph, or end the line with two spaces for a line break.

Is my Markdown saved?

Yes, in this browser only. It is stored on your computer so it is still in the box next time you open the page.

Listed on

Listed on JustMacAppsMotionShine on Mac App IndexMotionShine on ScrollLaunchMotionShine featured on StartupBaseFeatured on FazierFeatured on Twelve ToolsMotionShine - Featured on Smol Launch