Markdown Syntax Reference
Markdown formatting syntax for headers, lists, links, and more.
A one-page cheat sheet for Markdown, the plain-text way of formatting that's used in README files, GitHub and GitLab, Reddit, Discord, Slack, note apps such as Obsidian and many website editors. Each row shows what you type and what you get: hash signs for headings (# for the biggest, ###### for the smallest), asterisks or underscores for bold and italic, square brackets and parentheses for links and images, hyphens or numbers for lists, a greater-than sign for quotes, backticks for code, and three hyphens for a horizontal line. Rows marked GFM are GitHub Flavored Markdown extras: strikethrough with two tildes, task lists with checkboxes, and tables made with pipes and hyphens. Fenced code blocks, made with three backticks and an optional language name, are supported almost everywhere. Markdown was created by John Gruber in 2004 to be easy to read even before it's formatted. Because each app adds its own extensions, a few things (such as tables, task lists and how a single line break behaves) vary between apps. To see how your Markdown will look, paste it into the Markdown Preview.
Markdown syntax
| You type | You get |
|---|---|
| # Heading 1 … ###### Heading 6 | Headings, level 1 to 6 |
| **bold** or __bold__ | Bold text |
| *italic* or _italic_ | Italic text |
| ~~strikethrough~~ | Strikethrough (GitHub Flavored Markdown) |
| [link text](https://example.com) | A link |
|  | An image |
| - item or * item | A bulleted list |
| 1. item | A numbered list |
| - [ ] task / - [x] done | A task list (GFM) |
| > quote | A block quote |
| `code` | Inline code |
| ```js … ``` | A fenced code block with syntax highlighting |
| --- | A horizontal rule |
| | a | b |\n|---|---| | A table (GFM) |
| Two spaces at line end, or a blank line | A line break / a new paragraph |
| \* | A literal asterisk (escape) |
Common use cases
- Format a README, wiki page or GitHub issue
- Write notes in a Markdown app
- Format messages in apps that support Markdown
- Look up table or code block syntax you've forgotten
How to use
- Find what you want to do in the You get column.
- Type what's shown in the You type column.
- Check the GFM rows if your app is based on GitHub's version.
FAQ
How do I make a table in Markdown?
Put a pipe ( | ) between columns, and add a line of hyphens under the header row, like | Name | Age | then |---|---| then | Sam | 30 |. Tables are part of GitHub Flavored Markdown and most modern apps, but not the original Markdown.
How do I add a line break?
Leave a blank line to start a new paragraph. For a line break within a paragraph, end the line with two spaces or a backslash; some apps, like GitHub comments, also treat a single new line as a break.
How do I show an asterisk instead of making text italic?
Put a backslash in front of it: \* shows a literal asterisk. The same works for other characters Markdown uses, such as \_ and \#.
Related tools
- Binary Prefixes TableIEC binary prefixes (kibi, mebi, gibi) vs SI prefixes for data sizes.
- Color Name ReferenceNamed colors with HEX, RGB, and HSL values for CSS and design.
- HEX Color ListPopular HEX color codes organized by color family.
- Web Safe Colors List216 web-safe colors that display consistently across browsers.
- Mac Keyboard ShortcutsmacOS keyboard shortcuts for productivity and navigation.
- Markdown PreviewIn Utilities
- HTML to MarkdownIn Utilities
- Table to Markdown ConverterIn Utilities