Markdown to HTML

Markdown Syntax

Complete reference for Markdown and GitHub-Flavored Markdown (GFM) syntax — every element with the Markdown source and resulting HTML.

Headings

MarkdownHTML output
# H1<h1>H1</h1>
## H2<h2>H2</h2>
### H3 through ###### H6<h3> through <h6>

Emphasis

MarkdownHTML output
**bold** or __bold__<strong>bold</strong>
*italic* or _italic_<em>italic</em>
***bold italic***<strong><em>bold italic</em></strong>
~~strikethrough~~ (GFM)<del>strikethrough</del>

Links and images

MarkdownHTML output
[text](url)<a href="url">text</a>
[text](url "title")<a href="url" title="title">text</a>
![alt](image.jpg)<img alt="alt" src="image.jpg">

Code

MarkdownHTML output
`inline code`<code>inline code</code>
```js\ncode\n```<pre><code class="language-js">code</code></pre>

Lists

MarkdownHTML output
- item\n- item<ul><li>item</li><li>item</li></ul>
1. first\n2. second<ol><li>first</li><li>second</li></ol>
- [x] done\n- [ ] todo (GFM)Checkbox list items

Blockquotes and rules

MarkdownHTML output
> quoted text<blockquote>quoted text</blockquote>
--- or *** or ___<hr>

Tables (GFM)

MarkdownHTML output
| Col1 | Col2 |\n| --- | --- |\n| A | B |<table> with thead and tbody
| :--- | :---: | ---: |Left, center, right alignment

CommonMark vs GitHub-Flavored Markdown

CommonMark is the standardised specification for Markdown syntax that resolves the many ambiguities in the original Markdown documentation. It defines exactly how edge cases behave — what happens with nested emphasis, how list indentation works, when a blank line starts a new block. Most modern Markdown processors implement CommonMark.

GitHub-Flavored Markdown (GFM) is a superset of CommonMark that adds practical extensions: tables, task lists, strikethrough, fenced code blocks with language identifiers, autolinks for URLs and email addresses, and @mention syntax. If you write READMEs for GitHub or use markdown in tools like Notion, Obsidian, or Slack, you are likely using GFM. The syntax reference above marks GFM-specific extensions clearly.

When converting Markdown to HTML for use outside GitHub, check that your processor supports the extensions you are using. The Markdown to HTML converter on this site uses the marked library with GFM enabled, so all extensions in this reference will work.

Convert Markdown to HTML

Paste Markdown and get HTML output instantly. Full document option included.

Open Markdown to HTML →

Frequently asked questions

What is Markdown syntax?

Markdown syntax is a set of plain text conventions that get converted to HTML. # becomes an h1 header, **text** becomes bold, *text* becomes italic, [text](url) becomes a link. The full syntax is defined in the CommonMark specification, with extensions in GitHub-Flavored Markdown (GFM).

How do I create a table in Markdown syntax?

Use pipes | to separate columns and dashes --- to separate the header row from the data rows. Example: | Name | Age |\n| --- | --- |\n| Alice | 28 |. Align columns with :--- (left), :---: (center), or ---: (right) in the separator row.

How do I create a task list in Markdown?

Use - [x] for a checked item and - [ ] for an unchecked item. This is a GitHub-Flavored Markdown (GFM) extension. Example: - [x] Done item\n- [ ] Pending item. Not all Markdown processors support task lists — GFM-compatible processors like marked or GitHub do.

Can Markdown syntax include HTML?

Yes. In most Markdown processors you can include raw HTML directly and it passes through to the output unchanged. This is useful for elements Markdown does not support natively, like <details> accordions, coloured text, superscript, or custom CSS classes.

How do I escape Markdown syntax?

Use a backslash before the Markdown character: \* produces a literal asterisk, \# produces a literal hash, \[ produces a literal bracket. The escapable characters are: \ ` * _ { } [ ] < > ( ) # + - . ! |

What is GitHub-Flavored Markdown?

GitHub-Flavored Markdown (GFM) is a superset of CommonMark Markdown used by GitHub. It adds: tables, task lists (- [x]), strikethrough (~~text~~), fenced code blocks with language hints (```js), autolinks, mention syntax (@username), and @mentions. Most modern Markdown tools support GFM.