Runs in your browser

Markdown Cheatsheet

Every Markdown syntax with copyable examples.

Part of the Markdown Writer bot
Processed in your browser

Headings

Start a line with one to six # signs and a space.

Markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
Result
Markdown
Heading 1
=========

Heading 2
---------
Result

Bold, italic and strikethrough

Wrap text in asterisks or underscores. Strikethrough uses two tildes (GitHub Flavored Markdown).

Markdown
**bold** or __bold__

*italic* or _italic_

***bold and italic***

~~strikethrough~~
Result

Paragraphs and line breaks

Leave a blank line between paragraphs. End a line with two spaces or a backslash for a line break inside a paragraph.

Markdown
First paragraph.

Second paragraph.
Same paragraph, next line.\
Forced line break.
Result

Lists

Use -, * or + for bullets and numbers with a period for ordered lists. Indent to nest.

Markdown
- Apples
- Oranges
  - Blood orange
  - Navel
- Pears
Result
Markdown
1. Open the file
2. Edit the text
3. Save it
   1. Pick a folder
   2. Click Save
Result

Task lists

GFM

Add [ ] or [x] after a bullet for checkboxes.

Markdown
- [x] Write the draft
- [x] Add images
- [ ] Publish
Result

Links to headings

GFM

Link to a heading in the same document with # and its anchor: lower case, spaces become hyphens, punctuation removed.

Markdown
Jump to [Getting started](#getting-started).

## Getting started
Result

Images

Like a link with ! in front. The text in brackets is the alt text.

Markdown
![Sitebot logo](/assets/img/favicon.svg)

[![Clickable image](/assets/img/favicon.svg)](https://sitebot.si)
Result

Code

Backticks for inline code. Three backticks (or tildes) for a block; add a language for highlighting.

Markdown
Run `npm install` first.
Result
Markdown
```js
function greet(name) {
  return `Hello, !`;
}
```
Result

Blockquotes

Start lines with >. Nest with >>.

Markdown
> Markdown is a lightweight markup language.
>
> > Nested quote.
Result

Tables

GFM

Pipes separate columns; the second row sets alignment with colons.

Markdown
| Left | Center | Right |
| :--- | :----: | ----: |
| a    |   b    |     c |
| 10   |   20   |    30 |
Result

Horizontal rule

Three or more dashes, asterisks or underscores on their own line.

Markdown
Above

---

Below
Result

Escaping characters

Put a backslash before a character to show it literally.

Markdown
\*not italic\*

\# not a heading

1\. not a list
Result

HTML

Most renderers allow simple HTML for things Markdown can't do.

Markdown
<details>
<summary>Click to expand</summary>

Hidden content with **Markdown**.

</details>

H<sub>2</sub>O and E = mc<sup>2</sup>
Result

Try it

Result

About the Markdown Cheat Sheet

Every Markdown syntax on one page, with the source next to the rendered result. Covers headings, bold and italic, lists, links, images, code blocks, tables, task lists and GitHub Flavored Markdown extensions, with copyable examples.

How to use this cheat sheet

  1. Jump to a section or type in the filter box to find the syntax you need.
  2. Each example shows the Markdown source next to how it renders.
  3. Copy any example, or experiment in the Try it box at the bottom.

Standard Markdown and GFM

Everything here works in CommonMark, the Markdown standard. Sections marked GFM are GitHub Flavored Markdown extensions (tables, task lists, strikethrough, bare links), which also work on GitHub, GitLab, Reddit, Discord, Obsidian, Notion and most modern editors.

Questions

What is GitHub Flavored Markdown?

A widely used extension of standard Markdown that adds tables, task lists, strikethrough and automatic links. All Sitebot tools support it.

How do I make a line break without a new paragraph?

End the line with two spaces or a backslash, or use <br>.

How do I add a table of contents?

Use the TOC Generator to create one with links to every heading.

Also searched as: markdown syntax · markdown guide · markdown reference · markdown basics · github markdown cheat sheet · how to write markdown