Saved

Press the star next to a tool's name to save it.

All my tools

Markdown to HTML Converter

Paste your Markdown and this Markdown to HTML converter produces clean HTML for headings, lists, links, code and tables, with a preview of how the result will look.

Raw HTML in your Markdown is escaped, so it appears as plain text.

Your text stays in your browser. Nothing is uploaded.

HTML

Paste your Markdown and press Convert.

A Markdown to HTML converter turns plain text with simple formatting marks into code that's ready for a web page. Paste your Markdown, press Convert, and this Markdown to HTML converter produces clean HTML for headings, lists, links, images, block quotes, code and tables, with a preview of how it will look. It's useful for writers, developers and anyone who has written something in Markdown and needs to publish it somewhere that only accepts HTML. Everything happens in your browser, so your draft stays private.

How to use the Markdown to HTML converter

  1. Paste or type your Markdown.
  2. Press Convert.
  3. Check the preview.
  4. Copy the HTML into your page, your email template or your content system.

What is Markdown?

Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber created it in 2004 as an easy-to-read format. It's widely used for blogging, instant messaging, online forums, documentation and software project files. The original description contained some ambiguities, which led different tools to behave slightly differently, and so CommonMark was released in 2014 as a clearer specification.

Markdown cheat sheet

MarkdownHTML result
# HeadingA top-level heading
## HeadingA second-level heading
**bold**Bold text
*italic*Italic text
[text](https://example.com)A link
![alt](image.png)An image
- itemA bulleted list
1. itemA numbered list
> quoteA block quote
`code`Inline code
---A horizontal rule

A worked example

Suppose that you write a heading line, “# My Trip,” and a sentence, “It was **great**.” The converter produces an h1 element containing “My Trip,” followed by a paragraph in which the word “great” is wrapped in a strong element. A line beginning with a hyphen becomes a list item, and neighboring list items are collected into a single unordered list.

Code blocks and tables

For a block of code, put a line with three backticks above and below it. You can add a language name after the opening backticks, and it will be added as a class, which many code-highlighting tools can use. Characters inside code are escaped, so that your examples appear exactly as you typed them. Tables are written with vertical bars, and a line of hyphens under the first row marks it as the header.

Is the HTML safe?

This converter escapes any raw HTML that appears in your Markdown, so that it shows up as text instead of running as code. Links and images are limited to ordinary web addresses, which blocks tricks such as javascript: links. That makes it safer to convert text from sources you don't fully trust. If you intentionally want to mix raw HTML into your document, add it to the output after converting.

Why write in Markdown?

  • It's readable. Your text looks sensible even before it's converted.
  • It's quick. You can format without lifting your hands from the keyboard.
  • It's portable. Plain text opens anywhere and lasts for decades.
  • It works with version control, so changes are easy to compare.
  • It separates content from design. The HTML can be styled however you like.

Using the HTML

The output contains just the content, with no page wrapper or styling. Paste it into the body of an existing page or a content management system's HTML view, and your site's own styles will apply. If you need a full standalone page, wrap the output in the normal html, head and body elements. For an email, check how it displays in your email service, as these often have limited support for HTML.

What isn't supported?

Markdown has many extensions, and this tool covers the features people use most often. Nested lists are flattened into a single level, and footnotes and task lists aren't converted. If a document relies on these, or has very complicated formatting, a full Markdown processor in your own workflow will be the better choice.

Where you'll come across Markdown

Many writing and developer tools use Markdown directly. Project documentation on code hosting sites is often written in it, as are notes in many popular note-taking apps, and posts on a number of forums and static site generators. Knowing the basic marks takes only a few minutes, and the same skills work across all of these places. If you've written a document in one of them and need to move it to a site that only accepts HTML, converting it here will save you from reformatting everything by hand.

Tips for clean results

Leave a blank line between paragraphs, headings and lists, so that each block is recognized correctly. Use one heading at the top level for the title of your document, and work down through the levels in order, as this helps both readers and search engines to follow the structure.

Common mistakes

  • Forgetting the blank line between paragraphs.
  • Leaving out the space after a #. A heading needs that space.
  • Not closing a code fence. The rest of the page becomes code.

Tidy the result with the HTML formatter, count your words with the word counter, and check a page title with the title tag checker.

What next

Use this often? Add Markdown to to your Home screen.

Frequently asked questions

How does the Markdown to HTML converter work?

It reads each block of your text and turns the Markdown marks into the matching HTML elements.

Does it support tables?

Yes. Use vertical bars with a line of hyphens under the header.

Can I include raw HTML?

Raw HTML is escaped for safety, so add it after converting.

What is Markdown used for?

Blogging, documentation, forums, messaging and software projects.

Is my text uploaded?

No. The conversion runs in your browser.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools