You have probably met Markdown without knowing its name. A README file on a code hosting site, a note in a knowledge-base app, a comment in a project tracker or a chat message with *asterisks* that turned into italics: all of them use the same lightweight formatting language. It lets you write formatted text with plain characters, so a document stays readable even before it is rendered.
This guide is a practical cheat sheet. It covers the syntax you will use every day, explains the rules that trip beginners up, and shows how to practise with a live preview so you can see each change as you type.
What Markdown is and why people use it
Markdown was created in 2004 by John Gruber, with input from Aaron Swartz, as a way to write for the web without typing HTML tags. The idea is that the source text should look like a well-formatted plain-text email: # for a heading, dashes for a list, asterisks for emphasis.
Because the original description left some cases ambiguous, different apps interpreted it slightly differently. The CommonMark project later produced a precise specification, and many platforms now follow CommonMark plus their own extensions, such as tables and task lists in "GitHub Flavored Markdown". The core syntax below works almost everywhere.
People like Markdown because:
- files are plain text, so they open in any editor and work well with version control;
- formatting never gets hidden in menus or corrupted by copy-paste;
- the same file can be turned into HTML, PDF or slides.
The core syntax
Headings
Start a line with one to six # characters followed by a space:
# Page title
## Section
### Sub-section
One # is the largest heading. Use a single top-level heading per document and nest the rest logically.
Bold, italic and inline code
**bold text**
*italic text*
`inline code`
Underscores (_italic_, __bold__) work in most renderers too. Backticks mark code, file names and commands, and they stop the text inside from being formatted.
Lists
- First item
- Second item
1. First step
2. Second step
Leave a blank line before a list when it follows a paragraph. Many renderers also accept * or + for bullets, and indenting items creates nested lists.
Links
[link text](https://example.com)
The text in square brackets is what the reader sees; the address goes in round brackets with no space between the two parts.
Blockquotes and code blocks
> Quoted text starts with a greater-than sign.
For multi-line code, put three backticks on the line before and after the block. Anything inside is shown exactly as typed, in a monospaced font.
Paragraphs and line breaks
A blank line starts a new paragraph. This is the rule beginners miss most often: in standard Markdown, a single line break inside a paragraph is usually joined into the same line when rendered. To force a line break, end the line with two spaces or use a blank line.
Tables, task lists and other GitHub Flavored Markdown extras
GitHub Flavored Markdown (GFM) adds a few extensions that most modern tools now support:
| Name | Qty | Price |
| :---- | :-: | ----: |
| Apple | 3 | 1.20 |
- [x] Finished task
- [ ] Open task
~~struck-through text~~

In a table, the second row of dashes separates the header from the body, and colons set the alignment: :--- left, :---: centre, ---: right. The pipes do not need to line up. Task list items are list items that start with [ ] or [x]. Images use link syntax with a leading !, and the text in square brackets becomes the alt text read by screen readers. GFM also turns bare addresses such as https://example.com or www.example.com into links automatically.
Nested lists are created by indenting the child items under the parent's text, usually by two spaces for - bullets or three for numbered items:
- Fruit
- Apple
- Pear
- Vegetables
Practise with a live preview
Our Markdown Editor shows the rendered result next to your source, updating as you type. It uses the marked parser with GitHub Flavored Markdown turned on, so everything in this cheat sheet renders, including tables, task lists, strikethrough, nested lists, images and automatic links.
- Open the Markdown Editor. The Markdown box starts with a cheat sheet showing every element; click Cheat sheet sample to bring it back later, or Open .md file to load your own.
- Edit the example or replace it with your own text.
- Watch the Preview panel on the right update as you type. Turn on Line breaks if you want every single newline to become a line break, as in GitHub comments.
- Switch to the HTML tab to see the generated code, and click Copy HTML to copy it.
- Click Download .md to save your Markdown, or Download .html for a standalone web page with simple styling.
Raw HTML inside your Markdown is allowed but passed through a strict sanitiser first: formatting tags such as <kbd> or <details> survive, while scripts, iframes, event handlers and javascript: links are removed. Your text never leaves the browser. For conversion options such as a full HTML document, use Markdown to HTML; to turn a note into a document, Markdown to PDF handles the export. For a deeper look at the conversion itself, see how Markdown converts to HTML.
Other places to write Markdown
- Code editors. Most modern code editors include a Markdown preview pane. They are ideal for README files that live in a project.
- Note-taking apps. Many note apps store notes as Markdown files and render them as you type.
- Code hosting sites. README files, issues and pull request descriptions are rendered as Markdown, usually with a "Preview" tab next to the editor. Their flavour supports tables and task lists.
- Chat tools. Several chat and collaboration apps accept a subset of Markdown for bold, italic, code and quotes, though the exact rules differ.
If your document will end up on a specific platform, do a final check in that platform's own preview, because extensions and edge cases vary.
Common mistakes and how to fix them
The heading shows a literal #
Most renderers require a space after the hash: ## Section, not ##Section. The heading also has to start at the beginning of the line.
Asterisks appear instead of bold text
Check that the markers are paired and touch the words: **bold** works, ** bold ** often does not. An unclosed * can also make the rest of a paragraph italic.
My list is part of the paragraph above
Insert a blank line between the paragraph and the first list item. Some renderers are strict about this.
Line breaks disappear
A single line break inside a paragraph is joined into one line in standard Markdown. Leave a blank line for a new paragraph, or end the line with two spaces for a line break. Some platforms, including GitHub comments and some chat tools, treat every line break as a break, which adds to the confusion. Our editor follows the standard rule by default; switch on Line breaks to mimic those platforms, and confirm the final result on the platform where the text will live.
Underscores in words turn into italics
Names like file_name_v2 can trigger italics in some older renderers. Wrap technical names in backticks, which also makes them easier to read.
Special characters I actually want to show
Put a backslash before a character to show it literally: \*not italic\* or \# not a heading.
Tips for readable Markdown
- Keep one blank line between blocks (headings, paragraphs, lists, code).
- Use sentence-length lines in long documents; it makes diffs and reviews easier.
- Put URLs in link syntax rather than pasting them bare, so readers see meaningful text.
- If you need plain text without the symbols, Markdown to Text strips the formatting.
Frequently asked questions
Is Markdown the same everywhere?
The core syntax (headings, emphasis, lists, links, code) is nearly universal. Extras such as tables, task lists, footnotes and line-break handling differ between platforms, so check the preview of the site you are publishing on.
How do I make text bold in Markdown?
Wrap it in double asterisks, like **important**. Single asterisks make text italic.
How do I add a line break without a new paragraph?
End the line with two spaces before pressing Enter. Some platforms also accept a backslash at the end of the line or treat every line break as a break.
Can Markdown include images and tables?
Yes. Standard Markdown supports images with , and GitHub Flavored Markdown adds pipe tables. Our editor renders both, along with task lists and strikethrough. Images are loaded from their web address by your browser, so they only appear if the link is publicly reachable.
What file extension do Markdown files use?
Usually .md, sometimes .markdown. They are plain text files and open in any text editor.