Markdown Cheat Sheet: Every Syntax You Need, With Examples
Markdown lets you format text with a few simple symbols, and it's used everywhere from GitHub to Notion to static websites. This cheat sheet covers all the syntax you'll need, with examples you can copy.
Quick answer
# Heading, **bold**, *italic*, [link](url), , - list item, 1. numbered, > quote, `code`, and ``` for code blocks. Tables use pipes: | a | b |. Try anything in a live Markdown editor to see the result instantly.
What is Markdown?
Markdown is a lightweight markup language created by John Gruber in 2004. Its goal is simple: text that's easy to read as is, and that converts cleanly to HTML. Today it's the standard for README files, documentation, developer forums, note-taking apps like Obsidian, chat apps like Slack and Discord, and many blogging platforms.
The most common dialect is GitHub Flavored Markdown (GFM), which adds tables, task lists, strikethrough and automatic links to the original syntax.
Headings
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
Use one # heading per document (the title), and keep the levels in order. Always put a space after the #.
Emphasis
| Markdown | Result |
|---|---|
**bold** | bold |
*italic* or _italic_ | italic |
***bold italic*** | bold italic |
~~strikethrough~~ | |
`inline code` | inline code |
Links and images
[Link text](https://example.com)
[Link with title](https://example.com "Hover text")
<https://example.com>

[Reference link][docs]
[docs]: https://example.com/docs
Write meaningful alt text for images. It's read aloud by screen readers and helps search engines understand the image.
Lists
- Bullet item
- Another item
- Nested item (indent 2 spaces)
1. First step
2. Second step
3. Third step
- [x] Finished task
- [ ] Open task
Task lists (- [ ]) are part of GFM and render as checkboxes on GitHub and in many editors.
Blockquotes
> This is a quote.
>
> It can span several paragraphs.
Code blocks
```js
function greet(name) {
return `Hello, ${name}!`;
}
```
Wrap code in three backticks and add the language name (js, python, bash, json…) so syntax highlighters can color it.
Tables
| Tool | Category | Price |
| :---------- | :------: | ----: |
| Summarizer | Text | Free |
| OCR | Images | Free |
Colons in the separator row set alignment: :--- left, :---: center, ---: right. The columns don't need to line up in the source; it just makes it easier to read.
Horizontal rules and line breaks
Three dashes on their own line make a divider:
---
End a line with two spaces (or a backslash)\
to force a line break inside a paragraph.
A blank line starts a new paragraph. Most formatting problems come from missing blank lines between paragraphs, lists and headings.
Escaping special characters
To show a symbol that Markdown would normally interpret, put a backslash before it: \*not italic\*, \#not a heading, \[not a link\].
Try it live and export HTML
- Open the free Markdown to HTML editor.
- Type Markdown, or use the toolbar for headings, bold, links, lists, tables and code.
- Watch the preview update as you type. Switch to the HTML tab to see the generated code.
- Copy the HTML, download a complete .html page, or save your .md file.
Your draft is saved in your browser automatically, and nothing is uploaded.
Try it free: Markdown to HTML
Write Markdown with a live preview and export clean HTML. Runs in your browser, no sign-up.
Markdown tips
- Leave blank lines around headings, lists, code blocks and tables.
- Be consistent: pick
-or*for bullets and stick with it. - Use relative links in repositories (
[Setup](docs/setup.md)) so they work on every branch. - Preview before publishing. Platforms differ slightly in the extensions they support.
- Use HTML when you need to. Most Markdown processors accept inline HTML for things Markdown can't do, like
<kbd>or<details>, although some platforms strip it for security.
Frequently asked questions
What's the difference between Markdown and GitHub Flavored Markdown?
GFM is a superset of standard (CommonMark) Markdown that adds tables, task lists, strikethrough and automatic URL links.
How do I underline text in Markdown?
Markdown has no underline syntax, because underlined text looks like a link. If you really need it, use HTML: <u>text</u>.
How do I add a line break without a new paragraph?
End the line with two spaces or a backslash, or use <br>.
Is the exported HTML safe to use on my website?
Yes. The exported HTML is clean, semantic markup without inline styles, and the preview is sanitized to block scripts.
The bottom line
A dozen symbols cover almost everything you'll ever write in Markdown. Keep this cheat sheet handy, leave blank lines between blocks, and preview your text before publishing.
Found something out of date or unclear? Email contact@ultratoolsai.com and we'll fix it.


