Markdown to HTML Converter — Turn Markdown into clean, ready-to-use HTML as you type.

Paste or write Markdown and the HTML appears instantly, with a live preview if you want to see how it will look. It handles headings, lists, tables, task lists and code blocks. Copy the result, download it as a file or wrap it as a full page. Everything runs in your browser.

Convert Markdown Your text stays in your browser
Markdown to HTML converter showing Markdown text on the left and the converted HTML code on the right

Markdown input

Options

HTML output

–Input words
–Headings
–Links
–HTML size
The guide

Markdown to HTML Guide: Write Simply, Publish Anywhere

What Markdown is and how it turns into HTML.

A simple explanation

What is a Markdown to HTML Converter?

Markdown is a lightweight way to write formatted text with ordinary characters. A Markdown to HTML converter turns that text into the HTML tags a web page needs, so you can write quickly and still end up with proper headings, lists, links and tables.

Because Markdown is easy to read even before it is converted, it is popular for documentation, README files, notes, blog drafts and content that moves between tools. This converter gives you the HTML as soon as you type, with an optional preview and a complete page if you need one.

Common reasons to use it

Why People Use a Markdown Converter

Blog posts and web content

Draft in Markdown, then paste clean HTML into a CMS, a template or an email builder.

Documentation

Turn README files and notes into HTML you can drop into a help page or an internal site.

Learning Markdown

Type a few characters and see exactly which HTML tags they produce, side by side.

How it works

How Markdown Becomes HTML

The converter reads your text block by block. A line starting with one to six # characters becomes a heading, lines starting with a dash or a number become list items, and a line of three or more dashes becomes a horizontal rule. Text inside a pair of triple backticks becomes a code block, and everything that is left is grouped into paragraphs. Inside those blocks, characters such as * and _ create emphasis, and square brackets followed by round brackets create links.

MarkdownHTML
# Heading 1<h1>Heading 1</h1>
**bold** and *italic*<strong>bold</strong> and <em>italic</em>
[text](https://example.com)<a href="https://example.com">text</a>
- item<ul><li>item</li></ul>
1. step<ol><li>step</li></ol>
`code`<code>code</code>
> quote<blockquote><p>quote</p></blockquote>
~~gone~~<del>gone</del>

Plain Markdown treats a single new line as a space and starts a new paragraph at a blank line. The converter also understands the GitHub-style extras that most people expect today: tables, task lists, strikethrough and automatic links.

Get it done in a few steps

How to Convert Markdown to HTML

  1. Paste your Markdown into the input box, open a .md file, or press Sample to see an example.
  2. Choose your options: a full HTML page, heading ids, line breaks or raw HTML.
  3. Read the HTML in the output box, or switch to Preview to see how it looks.
  4. Press Copy, or Download to save the HTML as a file.
Better results

Simple Tips

  • Leave a blank line before and after headings, lists, tables and code blocks. It is the most common fix for Markdown that does not convert as expected.
  • Use a fenced code block with the language name after the backticks. The HTML gets a language class that syntax highlighters can use.
  • Keep Allow raw HTML off for text you did not write yourself.
  • The preview uses plain styling. Your own site's CSS will decide how the HTML finally looks.
Good to know

Limitations and Privacy

Privacy

The conversion runs in your browser. Your Markdown is not uploaded, stored or logged, and the preview and the downloaded file are created on your device.

Limitations

This is a compact converter covering common Markdown and GitHub-style features. It is not a full CommonMark or GitHub engine, so footnotes, emoji codes, math and unusual edge cases are not handled. Raw HTML is passed through unchanged when you allow it, so sanitize untrusted content before publishing.

Common questions

Markdown to HTML Converter FAQ

What is Markdown?

Markdown is a way of writing formatted text using plain characters, such as # for a heading and ** around a word for bold. John Gruber created it in 2004, and it is now used in documentation, README files, notes and many websites.

Which Markdown features does this converter support?

Headings, paragraphs, bold, italic, strikethrough, inline code, fenced and indented code blocks, block quotes, ordered and nested lists, task lists, tables with alignment, links, reference links, images, autolinks and horizontal rules.

Is the result the same as GitHub's Markdown?

It follows the common CommonMark rules and adds GitHub-style tables, task lists, strikethrough and automatic links. GitHub's own renderer does more, such as emoji codes, mentions and footnotes, and some unusual edge cases can come out differently.

Is my text uploaded anywhere?

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

Is the HTML safe to publish?

By default any HTML you type is escaped, and links that start with javascript: or similar are blocked. If you turn on Allow raw HTML it is passed through unchanged, so run content from other people through a proper HTML sanitizer before you publish it.

Why are my single line breaks ignored?

In Markdown a single new line is treated like a space, and only a blank line starts a new paragraph. To force a line break, end the line with two spaces or a backslash, or turn on the option that turns single line breaks into <br> tags.

How do I make a table?

Separate the cells with pipes and add a row of dashes under the header, for example | Name | Price | and | --- | --- |. Add a colon on the left, right or both sides of the dashes to align the column left, right or centre.

How do I get a complete HTML page instead of a fragment?

Turn on Full HTML page. The result is wrapped in a doctype, head and body, with the first level one heading used as the page title.

What are heading ids for?

An id on a heading lets you link straight to that section, for example page.html#installation. With Add heading ids switched on, each heading gets a lowercase id built from its text, and repeated headings get a number added.

From people using this tool

Reviews

Loading reviews…
Keep going

More tools in the box

The homepage features dozens more free tools that don't require an API key.

Suggest a tool
' + body + ''; } function convert(){ var src = inEl.value, o = { raw: $('mdRaw').checked, breaks: $('mdBr').checked, ids: $('mdIds').checked }; msg.className = 'md-msg'; msg.textContent = ''; if (!src.trim()){ outEl.value = ''; lastHtml = ''; prev.srcdoc = previewDoc('

Your preview appears here.

'); ['mdS1','mdS2','mdS3','mdS4'].forEach(function(id){ $(id).textContent = '–'; }); return; } var res; try { res = mdToHtml(src, o); } catch (e) { msg.className = 'md-msg is-err'; msg.textContent = 'Something went wrong while converting this text. Try removing unusual content and convert again.'; return; } var body = res.body; lastHtml = $('mdDoc').checked ? wrapDoc(body, res.title) : body + (body ? '\n' : ''); outEl.value = lastHtml; prev.srcdoc = previewDoc(body); $('mdS1').textContent = words(src).toLocaleString(); $('mdS2').textContent = res.heads.toLocaleString(); $('mdS3').textContent = (body.match(/ 2 * 1024 * 1024){ flash('That file is over 2 MB', true); this.value = ''; return; } var rd = new FileReader(); rd.onload = function(){ inEl.value = String(rd.result); convert(); track('file_opened'); }; rd.onerror = function(){ flash('Could not read that file', true); }; rd.readAsText(f); this.value = ''; }); try { new MutationObserver(function(){ if (lastHtml) convert(); }).observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme'] }); } catch (e) {} convert(); })();