Markdown cheat sheet
Every piece of Markdown syntax you are likely to need, with the raw text on one side and the rendered result on the other. Everything on this page works in the ViewMarkdown viewer, in GitHub, and in most note apps and AI chat tools.
Headings
One to six # characters, then a space. Use one # per document for the title and step down from there.
You type
# Heading 1
## Heading 2
### Heading 3
#### Heading 4You get
Heading 1
Heading 2
Heading 3
Heading 4
Emphasis: bold, italic, strikethrough
Wrap text in symbols. Two asterisks for bold, one for italic, two tildes for strikethrough.
You type
**bold text**
*italic text*
***bold and italic***
~~struck through~~You get
bold text
italic text
bold and italic
struck through
Lists
Use - for bullets and 1. for numbers. Indent two spaces to nest. Add [ ] or [x] for a task list.
You type
- First item
- Second item
- Nested item
1. Step one
2. Step two
- [x] Done already
- [ ] Still to doYou get
- First item
- Second item
- Nested item
- Step one
- Step two
- Done already
- Still to do
Links
Square brackets for the text, round brackets for the address. A bare URL becomes a link on its own.
You type
[ViewMarkdown](https://viewmarkdown.com)
https://example.comYou get
Images
The same as a link with an exclamation mark in front. The text in brackets is the alt text.
You type
You get

Code
Backticks for inline code. Three backticks, optionally with a language name, for a block.
You type
Use `npm install` first.
```js
function greet(name) {
return `Hello, ${name}`;
}
```You get
Use npm install first.
function greet(name) {
return `Hello, ${name}`;
}
Block quotes
Start the line with >. Repeat the > to nest a quote inside a quote.
You type
> A quoted paragraph.
>
> > And one nested inside it.You get
A quoted paragraph.
And one nested inside it.
Tables
Pipes separate the cells. Colons in the divider row set the alignment: left, centre or right.
You type
| Item | Qty | Price |
| :--- | :-: | ----: |
| Pens | 12 | 3.40 |
| Paper | 2 | 11.00 |You get
| Item | Qty | Price |
|---|---|---|
| Pens | 12 | 3.40 |
| Paper | 2 | 11.00 |
Horizontal rules
Three or more dashes on their own line, with a blank line above them.
You type
Above the line.
---
Below the line.You get
Above the line.
Below the line.
Line breaks
A blank line starts a new paragraph. Two spaces at the end of a line force a break inside one.
You type
First paragraph.
Second paragraph.
Line one
Line two, same paragraph.You get
First paragraph.
Second paragraph.
Line one
Line two, same paragraph.
Escaping characters
Put a backslash before a character to show it literally instead of letting it format the text.
You type
\*not italic\*
\# not a heading
2 \* 3 = 6You get
*not italic*
# not a heading
2 * 3 = 6
Frequently asked questions
What is Markdown?
Markdown is a plain-text way to write formatted documents. Symbols like # for a heading and ** for bold turn into real formatting when the text is rendered, so the raw file stays readable on its own.
Is Markdown the same everywhere?
The core syntax is the same everywhere. Extras differ: tables, task lists and strikethrough come from GitHub-flavored Markdown and are supported by most modern tools, including ViewMarkdown, but not by the original 2004 specification.
How do I make a table in Markdown?
Separate the cells with pipe characters and put a row of dashes under the header row. Add a colon on the left, both sides or the right of the dashes to align that column left, centre or right.
How do I add a line break in Markdown?
Leave a blank line to start a new paragraph. To break a line inside the same paragraph, end the line with two spaces, or with a backslash in most editors.