Cheat Sheet

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

![Alt text](image.png)
![With title](image.png "Tooltip text")
![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)

FeatureCommonMarkGFM (GitHub)MDX/Astro
TablesNoYesYes
StrikethroughNoYesYes
Task listsNoYesYes
FootnotesNoYesYes
Auto-linked URLsPartialYesYes
Inline HTMLYesSanitizedJSX
Syntax highlightingNo (renderer)YesYes (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 cheat sheet markdown syntax github markdown gfm cheatsheet markdown reference markdown examples

Explore 300+ Free Tools

Utilko has tools for developers, writers, designers, students, and everyday users — all free, all browser-based.