Markdown Cheat Sheet — Complete Syntax Guide (GFM + CommonMark)
Full Markdown syntax reference: headings, emphasis, lists, links, images, tables, code blocks, task lists, footnotes, and all GitHub Flavored Markdown extensions. Free, bookmarkable.
Every Markdown element, with working examples. Covers CommonMark (the standard) + GitHub Flavored Markdown (GFM) extensions that most platforms support. Convert any Markdown to HTML with Markdown to HTML.
Headings
# H1 heading
## H2 heading
### H3 heading
#### H4 heading
##### H5 heading
###### H6 heading
Alternate H1
============
Alternate H2
------------
Emphasis
*italic* or _italic_
**bold** or __bold__
***bold italic***
~~strikethrough~~ (GFM)
==highlight== (some extensions)
<sup>superscript</sup> (HTML fallback)
Lists
- Unordered item
- Another item
- Nested item
- Another nested item
- Back to top level
1. Ordered item
2. Another item
1. Nested
2. Nested
3. Back to top level
- [ ] Unchecked task (GFM)
- [x] Completed task
Links
[Inline link](https://utilko.com)
[Link with title](https://utilko.com "Utilko home")
[Reference link][1]
[Auto-link]: https://utilko.com
<https://utilko.com> ← auto-linked URL
<[email protected]> ← auto-linked email
[1]: https://utilko.com
Images


![Reference][img]
[img]: image.png
Code
Inline: `console.log('hi')`
Fenced block:
```javascript
function hello() {
return 'world';
}
```
Indented block (4 spaces):
function hello() {
return 'world';
}
Tables (GFM)
| Column A | Column B | Column C |
| -------- | :------: | -------: |
| left | center | right |
| data | data | data |
Alignment is controlled by colons in the separator row: :-- left, :-: center, --: right.
Blockquotes
> This is a quote.
> Multiple lines work.
>
> > Nested quote.
>
> Back to top-level quote.
Horizontal rules
---
***
___
Line breaks
End a line with two spaces
for a hard break.
Or leave a blank line
for a paragraph break.
Escape characters
Prefix a special character with \ to display it literally: \* \_ \[ \] \( \) \# \+ \- \. \! \{ \} \<.
Footnotes (GFM)
Here's a claim[^1] that needs a footnote.
[^1]: The footnote content goes here.
Syntax highlighting languages
Common language identifiers for fenced code blocks:
javascript · typescript · python · go · rust · java · kotlin · swift · cpp · c · csharp · ruby · php · bash · sh · powershell · sql · html · css · scss · json · yaml · toml · xml · markdown · diff · dockerfile · nginx
Flavor differences (what works where)
| Feature | CommonMark | GFM (GitHub) | MDX/Astro |
|---|---|---|---|
| Tables | No | Yes | Yes |
| Strikethrough | No | Yes | Yes |
| Task lists | No | Yes | Yes |
| Footnotes | No | Yes | Yes |
| Auto-linked URLs | Partial | Yes | Yes |
| Inline HTML | Yes | Sanitized | JSX |
| Syntax highlighting | No (renderer) | Yes | Yes (plugin) |
Common platform nuances
- Slack: Uses a Markdown-like syntax with
*bold*(single asterisks) and_italic_, no tables. - Discord: Similar to Slack; adds
||spoiler||. - Reddit: Close to CommonMark, with
>!spoiler!<extension. - WhatsApp:
*bold*,_italic_,~strikethrough~,`monospace`. - Notion: Extended Markdown with block references, toggles, callouts.
Convert in one click
Use Markdown to HTML to render any Markdown you write against GFM rules. Going the other way — extracting Markdown from HTML (e.g., copying a rendered article) — use HTML to Markdown. For previewing generated HTML in a sandboxed iframe before deploying, HTML preview.
Featured Tools
Try these free tools directly in your browser — no sign-up required.
Markdown to HTML Converter
Convert Markdown to HTML instantly online. Transform README files, blog posts, and documentation written in Markdown into clean HTML output.
HTML to Markdown Converter
Convert HTML to clean Markdown syntax instantly. Transform web content, blog posts, and documentation from HTML tags to readable Markdown format.
HTML Preview
Paste HTML, CSS, and JavaScript and see a live preview instantly in a sandboxed iframe. Like a lightweight CodePen, no sign-up needed.
Word Counter
Count words, characters, sentences, and paragraphs instantly. Paste any text and get a detailed breakdown in real time — no sign-up needed.