Markdown Cheatsheet
Choose a Markdown topic
Start with one group of examples, then open the complete reference.
Essential Markdown syntax, grouped by category and shown with both the copy-ready source and the output of a real parser. It covers CommonMark basics (headings, lists, emphasis, links, images and fenced code) plus GitHub Flavored Markdown extensions (tables, task lists, strikethrough and bare URL autolinking). Keep it handy when you switch between GitHub, GitLab, Obsidian and static-site generators.
How to use the cheatsheet
-
1
Browse by category
Filter the full reference or choose one topic in the guided view.
-
2
Compare source and result
Each example shows the raw Markdown beside output from a real GFM parser.
-
3
Copy the snippet
Tap copy to grab the source for any example.
-
4
Check the dialect badge
Each example is marked as CommonMark or GitHub Flavored Markdown (GFM).
Headings
# H1 title
## H2 section
### H3 subsection
Use ATX-style (#) rather than Setext (=== under text). Every parser supports both, but ATX is easier to read in a diff.
Emphasis
*italic* or _italic_, **bold** or __bold__, ***bold italic***. GFM adds ~~strikethrough~~.
Lists
Unordered lists use -, * or + (pick one and stick with it):
- First
- Second
- Nested
Ordered lists renumber automatically:
1. Item
1. Item
1. Item
Code
Inline: `code`. Fenced blocks with optional language tag:
```python
def hello(name):
return f"Hello, {name}"
```
Indent with four spaces for a code block if you prefer the older syntax.
Links and images
[Link text](https://example.com)
[Link with title](https://example.com "Tooltip")

Reference-style keeps long URLs out of the paragraph:
See the [docs][1].
[1]: https://example.com/docs
Tables (GFM)
| Col A | Col B |
|-------|------:|
| a | 1 |
| b | 22 |
Alignment uses colons in the separator row: :--- left, :---: center, ---: right.
Task lists (GFM)
- [x] Done
- [ ] Todo
Common gotchas
- Two trailing spaces insert a line break within a paragraph. One space just joins the lines.
- Blank line required before most block elements (headings, lists, code blocks).
- Nested-list indentation depends on the parent marker and content. Align the nested marker under the parent text instead of assuming a fixed number of spaces.
- Escape with backslash for literal punctuation:
\*not italic\*. - Smart quotes differ by renderer. GitHub leaves them alone; Pandoc converts.
Frequently Asked Questions
CommonMark defines the portable core, including headings, lists, links and fenced code with optional info strings. GFM (GitHub Flavored Markdown) adds tables, task lists, strikethrough and autolinking for bare URLs. Other editors may implement a subset or add their own extensions.
In a Markdown file, a single newline is normally a soft break. For a hard line break in CommonMark or GFM, end the first line with two spaces or a backslash.
CommonMark recognizes raw HTML, but the host decides whether to allow, sanitize or escape it. GitHub sanitizes rendered HTML, and this cheatsheet escapes HTML in previews for safety.
CommonMark has no built-in table-of-contents syntax. GitHub creates heading anchors and shows an outline for files with multiple headings. Other platforms have their own behavior: MkDocs can use [TOC] when its TOC extension is enabled, while Docusaurus derives a page TOC from headings.
The CommonMark examples and many GFM examples do. Obsidian also supports its own wikilinks ([[Page name]]), callouts and embeds; those extensions are outside this cheatsheet.
Related Tools
HEX Color Picker
Pick or enter a HEX colour and get RGB, HSL, approximate CMYK, relative luminance and contrast ratios against white and black.
ASCII Table Reference
Full ASCII table from 0 to 127 with decimal, hex, octal, binary, standard names and HTML numeric-reference notation, including NUL, LF and DEL.
Color Palette Generator
Generate monochromatic, analogous, complementary, triadic or tetradic color palettes from a base HEX color and export copy-ready CSS variables.
FPS Counter
Measure browser FPS with requestAnimationFrame, smoothing, min/max frame rate, warnings and an optional graph. Runs locally with no upload or API.
Phone Validator
Validate phone numbers by country, detect the region and type, and normalize valid numbers to E.164, international, national and RFC 3966 formats.
JSON Formatter
Paste JSON to pretty-print with 2 or 4 spaces, minify it to compact output, or run a quick syntax check before copying the result.