This Markdown Cheat Sheet provides a complete guide to syntax elements, from basic formatting to advanced usage in various applications and platforms.
Markdown has quietly become the default writing format for the internet’s technical corners — README files, GitHub issues, Slack messages, Notion pages, and static site blogs all lean on it. Part of the appeal is how small the syntax actually is: a handful of symbols cover almost everything you’ll ever need to format text. This is the complete reference, from the basics to the syntax people forget exists.

What Markdown Is and Why It Exists
Markdown was created in 2004 by John Gruber, designed around one specific goal: plain text that’s readable as plain text, while still converting cleanly into HTML. That’s the core idea behind every symbol in the syntax — an asterisk around a word (*word*) looks like emphasis even before it’s converted, unlike an HTML tag (<em>word</em>), which clutters the raw text.
This is why Markdown spread so widely: it’s fast to write, easy to read in its raw form, and every tool that supports it converts it to the same predictable HTML underneath.
Headings
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
Headings use # symbols, with the number of # characters matching the heading level. Most renderers support up to six levels (######), though anything past three or four is rare in practice.
Text Emphasis
| Syntax | Result | Effect |
|---|---|---|
*italic* or _italic_ | italic | Italic text |
**bold** or __bold__ | bold | Bold text |
***bold italic*** | bold italic | Bold and italic together |
~~strikethrough~~ | Strikethrough (GitHub-Flavored Markdown) |
Asterisks and underscores work interchangeably for basic emphasis, though most style guides recommend picking one and sticking with it for consistency across a document.
Lists
Unordered lists use -, *, or + (any of the three works, and can’t be mixed within the same list):
- First item
- Second item
- Third item
Ordered lists use numbers followed by a period:
1. First step
2. Second step
3. Third step
Nested lists indent with either two or four spaces, depending on the renderer:
- Parent item
- Child item
- Another child
Links and Images
[Link text](https://example.com)

The only difference between a link and an image is the leading ! — images are essentially links that get automatically rendered inline instead of clicked.
Reference-style links are less common but useful for documents with many repeated links, since they keep the prose cleaner:
This is a [reference link][1].
[1]: https://example.com
Code
Inline code wraps a single backtick around the text:
Use the `console.log()` function to print output.
Code blocks use three backticks on their own line, optionally followed by a language name for syntax highlighting: <pre> “`javascript function greet() { console.log(“Hello, world!”); } “` </pre>
Indented code blocks (four spaces or one tab, with no backticks) also work in original Markdown, though fenced code blocks with triple backticks are now the more common convention, especially since they support language-specific highlighting.
Blockquotes
> This is a blockquote.
> It can span multiple lines.
Blockquotes can be nested by adding additional > symbols, and can contain other Markdown elements like lists or emphasis inside them.
Tables (GitHub-Flavored Markdown)
| Header 1 | Header 2 |
|----------|----------|
| Cell A | Cell B |
| Cell C | Cell D |
Column alignment is controlled by colons in the separator row:
| Left | Center | Right |
|:-----|:------:|------:|
| a | b | c |
Tables aren’t part of the original Markdown specification — they were introduced by GitHub-Flavored Markdown (GFM) and are now supported by most modern renderers, but not universally by every tool.
Task Lists (GitHub-Flavored Markdown)
- [x] Completed task
- [ ] Incomplete task
Common in GitHub issues and project READMEs for tracking simple checklists directly inside a document.
Horizontal Rules
Three or more hyphens, asterisks, or underscores on their own line create a horizontal divider:
---
Line Breaks and Paragraphs
This is the part that trips up more people than any other Markdown rule: a single line break is usually ignored by the renderer — two consecutive lines of plain text get joined into one paragraph. To force an actual line break within a paragraph, either end a line with two or more trailing spaces, or leave a fully blank line between paragraphs to start a new one entirely.
Escaping Characters
To display a literal character that Markdown would otherwise interpret as formatting (like a literal asterisk), escape it with a backslash:
\*this is not italic\*
Original Markdown vs. GitHub-Flavored Markdown (GFM)
| Feature | Original Markdown | GFM |
|---|---|---|
| Headings, bold, italic, links | ✅ | ✅ |
| Tables | ❌ | ✅ |
| Strikethrough | ❌ | ✅ |
| Task lists | ❌ | ✅ |
| Automatic URL linking | ❌ | ✅ |
| Fenced code blocks with syntax highlighting | ❌ | ✅ |
Most Markdown tools today — including editors, static site generators, and this converter — support GFM by default, since it’s become the de facto standard even outside of GitHub itself.
Frequently Asked Questions
Does Markdown support custom fonts or colors? Not natively — Markdown is intentionally limited to structural and semantic formatting (headings, emphasis, lists, links), not visual styling. For colors or custom fonts, you’d need to drop into raw HTML directly within the Markdown, which most renderers allow.
Can I use HTML inside Markdown? Yes, in most implementations — raw HTML tags placed inside a Markdown document are generally passed through untouched and rendered as HTML. This is useful for things Markdown doesn’t support natively, like specific alignment or embedded elements.
Why isn’t my line break working? This is the single most common Markdown frustration: a lone line break is treated as a space, not a new line. Either end the line with two trailing spaces, or use a fully blank line to start a new paragraph instead.
Is Markdown the same everywhere? Not exactly — while the core syntax (headings, bold, italic, links, lists) is universal, extended features like tables, task lists, and footnotes vary by platform. GitHub, GitLab, Reddit, and various note-taking apps each support slightly different supersets of the original specification.
Want to see your own Markdown converted instantly? Use the Markdown to HTML Converter above to write or paste Markdown and get clean, ready-to-use HTML in real time.
