About the Markdown to HTML converter
Markdown is a simple way to write formatted text with plain characters: # for headings, ** for bold, - for lists. It's used for READMEs, docs, blog posts and comments, but websites and emails need HTML.
This converter turns Markdown into clean HTML using GitHub-flavored Markdown, so tables, task lists, strikethrough and fenced code blocks all work. Switch to Preview to see the rendered result before you copy the HTML.
How to use the Markdown to HTML converter
- Write or paste Markdown into the Input editor, or click Load sample.
- Choose the options you need: GitHub-flavored Markdown, line breaks as
<br>, or safe mode for untrusted text. - Click Convert to HTML or press Ctrl + Enter (Cmd + Enter on Mac).
- Switch between HTML and Preview, then click Copy result to copy the HTML.
Example
README section to HTML
Input
## Install
Run `npm install` and then:
- start the **dev** server
- open [localhost](http://localhost:3000)Output
<h2>Install</h2>
<p>Run <code>npm install</code> and then:</p>
<ul>
<li>start the <strong>dev</strong> server</li>
<li>open <a href="http://localhost:3000">localhost</a></li>
</ul>Common errors and how to fix them
A list or heading shows as plain text
Markdown needs a blank line before a list or after a paragraph, and a space after # in headings. Write ## Title, not ##Title.
Line breaks inside a paragraph disappear
Standard Markdown joins lines in a paragraph. End a line with two spaces or a backslash for a break, or turn on the line-breaks option, which matches how GitHub comments behave.
A table shows up as pipes and dashes
Tables are a GitHub Flavored Markdown feature. Turn on GFM, and make sure the header row is followed by a separator row like | --- | --- |.
Good to know
- GitHub-flavored Markdown adds tables, task lists (
- [x]), strikethrough (~~text~~) and automatic links. Turn it off for plain CommonMark. - By default a single line break stays inside the paragraph, as in standard Markdown. Turn on Line breaks become
<br>to match how GitHub comments and many chat apps behave. - Markdown can contain raw HTML, which is copied into the output as-is. Escape raw HTML (safe mode) shows it as text instead and keeps only
http,https,mailto,teland relative links, replacing others such asjavascript:with#. Use it whenever the Markdown comes from someone else. - The preview runs in a sandboxed frame with scripts turned off, so HTML inside the Markdown can't affect this page.
Frequently asked questions
What is the difference between Markdown and HTML?
Markdown is a short, readable way to write formatting, like **bold**. HTML is the markup browsers display, like <strong>bold</strong>. Markdown is converted to HTML before it's shown on a web page.
Is the HTML output safe to put on my website?
If you wrote the Markdown yourself, yes. If it comes from users or another source, turn on safe mode so raw HTML and script links are neutralised, and still sanitise HTML on your server before storing or showing it.
Does it support code highlighting?
Fenced code blocks get a class such as language-js, which highlighting libraries like Prism or highlight.js use to add colors. The converter itself doesn't add the colors.