Markdown cheat sheet: every syntax you'll actually use
Markdown is a way of formatting plain text so it turns into nicely styled documents — headings, bold text, lists, links, tables — without ever leaving your keyboard for a mouse. It was created in 2004 by John Gruber, and a later extension called GitHub-Flavored Markdown (GFM) added the bits people use most today: tables, task lists, and fenced code. This page is a practical reference to the syntax you'll actually reach for, with examples you can copy straight into the converter.
Headings
Put one to six # characters at the start of a line. One # is the biggest (the document title); six is the smallest.
# Heading 1
## Heading 2
### Heading 3
Leave a blank line before a heading. Use headings to give a document structure — it makes long documents far easier to scan, and in a PDF it's what turns a wall of text into something navigable.
Bold, italic, and strikethrough
*italic* or _italic_
**bold** or __bold__
***bold and italic***
~~strikethrough~~
Renders as: italic, bold, and struck-through text. Strikethrough (~~ ~~) is a GFM addition, so it needs a converter that supports GFM.
Lists
For a bulleted list, start each line with -, *, or +. For a numbered list, use 1., 2., and so on — the actual numbers don't have to be right, Markdown renumbers them for you.
- First item
- Second item
- Indented sub-item (two spaces)
1. Step one
2. Step two
3. Step three
To nest a list, indent the child items by two spaces (or a tab).
Task lists
A GFM checklist — great for to-dos and requirements:
- [x] Done
- [ ] Not done yet
Links and images
[link text](https://example.com)
[link with a title](https://example.com "hover text")


The only difference between a link and an image is the leading !. The text in square brackets for an image is the “alt text” — a description used by screen readers and shown if the image can't load. Always write meaningful alt text.
Tables
Tables come from GFM. Separate columns with pipes (|) and put a divider row of dashes under the header. Colons in the divider row set alignment.
| Item | Qty | Price |
|:--------|----:|------:|
| Cable | 10 | $2.50 |
| Adapter | 4 | $7.00 |
:--- is left-aligned, ---: is right-aligned (useful for numbers), and :--: is centred. The columns don't need to line up perfectly in the source — Markdown sorts that out.
Code
For a short snippet inside a sentence, wrap it in single backticks: `like this`. For a block of code, fence it with three backticks, and name the language after the opening fence to get syntax highlighting:
```python
def greet(name):
return f"Hello, {name}!"
```
Naming the language (python, js, bash, json, and so on) is what lets a converter colour the keywords and strings.
Blockquotes
> This is a quote.
>
> It can span multiple paragraphs.
Start each line with >. Quotes are handy for callouts and for quoting sources.
Horizontal rule
Three or more dashes on their own line draw a divider:
---
Line breaks and paragraphs
A blank line starts a new paragraph. If you need a line break within a paragraph, end the line with two spaces, or use a backslash \ at the end of the line. This trips up a lot of people — pressing Enter once usually does not create a visible line break in the output.
Escaping characters
If you want a literal character that Markdown would otherwise treat as formatting — say a real asterisk or underscore — put a backslash in front of it:
\*not italic\*
\# not a heading
A quick reference table
| You want | You type |
|---|---|
| Heading | # Title |
| Bold | **bold** |
| Italic | *italic* |
| Link | [text](url) |
| Image |  |
| Inline code | `code` |
| Bulleted list | - item |
| Numbered list | 1. item |
| Checkbox | - [ ] task |
| Quote | > quote |
| Divider | --- |
That covers everything most documents need. When you're ready to turn a Markdown file into something you can share, paste it into the converter and save it as a PDF — the tables, code and checkboxes above all carry through.