Quick Answer

Markdown is a lightweight syntax for formatting plain text that converts to HTML. Use hash symbols for headings, asterisks for bold and italic, and simple characters for lists, links, images, tables, and code blocks. It is fast to write and widely supported in tools like GitHub, Notion, and documentation. This cheatsheet covers every common element.

Markdown is the plain text format behind README files, documentation, blog posts, chat messages, and GitHub issues. You write simple symbols, and a renderer turns them into clean HTML. The whole point is that the raw text stays readable even before it is formatted. This cheatsheet collects every syntax you are likely to need, each with a small example you can copy and adapt. The core syntax is set out in the specification published by CommonMark.

Try It While You Read

Open our free Markdown Editor in another tab and paste the examples below. It shows your raw Markdown and the live preview side by side, all in your browser.

Open Markdown Editor →

How Do You Write Headings?

Headings use the hash symbol. One hash is the largest (an H1), and each extra hash drops one level, down to six hashes for the smallest (an H6). Put a space after the hashes.

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

In most documents you should use a single H1 for the title, then ## and ### for sections and subsections.

How Do You Add Bold and Italic?

Wrap text in one symbol for italic and two for bold. Asterisks and underscores both work, but asterisks are the safer choice because they work in the middle of a word too.

*italic text* or _italic text_
**bold text** or __bold text__
***bold and italic together***

So **ship it** renders as bold and *soon* renders as italic. You can also add strikethrough in most modern editors by wrapping text in two tildes, like ~~removed~~.

Blockquotes

Start a line with a greater-than symbol to quote it. Quotes can stack by adding more symbols, and they can contain other Markdown such as bold text.

> This is a quote.
> It can span several lines.
>
> > And this is a nested quote.

Blockquotes are handy for call-outs, citations, and pulling out an important note in documentation.

Unordered Lists

Begin each item with a hyphen, an asterisk, or a plus sign followed by a space. Pick one style and stay consistent. Indent with two spaces to create a nested item.

- First item
- Second item
  - Nested item
  - Another nested item
- Third item

Ordered Lists

Use a number followed by a period and a space. The numbers do not have to be correct, the renderer counts for you, but writing them in order keeps the raw text readable.

1. Clone the repository
2. Install the dependencies
3. Run the build
4. Open the preview

If you write 1. on every line, the output still counts up correctly, which makes reordering steps painless.

Put the visible text in square brackets and the address in round brackets right after. You can add an optional title in quotes that shows on hover.

[IWantFreeTools](https://iwantfreetools.com)
[Markdown Editor](../markdown-editor.html "Live preview")

A bare URL wrapped in angle brackets, like <https://example.com>, becomes a clickable link too.

Images

Images use the same syntax as links with a leading exclamation mark. The text in brackets becomes the alt text, which matters for accessibility and for cases where the image fails to load.

![A blue logo](logo.png)
![Chart of monthly sales](images/sales.png "2026 figures")

The alt text is read aloud by screen readers, so describe what the image shows rather than leaving it blank.

How Do You Create Tables?

Tables use pipes to separate columns and a row of hyphens to split the header from the body. Colons in the divider row set the alignment: left, right, or centered.

| Tool      | Free | Browser only |
| --------- | :--: | -----------: |
| Editor    | Yes  |          Yes |
| Generator | Yes  |          Yes |

The columns do not need to line up perfectly in the raw text, but spacing them out keeps the source easy to scan.

Inline Code and Code Blocks

For a short snippet inside a sentence, wrap it in single backticks. This is how you show a function name like getRandomValues() or a file name without it being treated as Markdown.

Run `npm install` before you start.

For multiple lines, use a fenced code block: three backticks on their own line before and after. Add a language name after the opening fence for syntax highlighting.

```js
function greet(name) {
  return "Hello, " + name;
}
```

Fenced blocks preserve every space and line break, so they are perfect for sharing commands, config files, and full functions.

Horizontal Rules

Three or more hyphens on their own line draw a horizontal divider. Leave a blank line above it so it is not mistaken for a heading underline.

Section one above.

---

Section two below.

Three asterisks or three underscores work the same way, but three hyphens are the most common and the easiest to read.

Task Lists

Task lists are checkboxes you can tick. Write a normal list item, then add square brackets after the bullet. Leave a space inside for an unchecked box, or put an x for a checked one.

- [x] Write the cheatsheet
- [x] Add examples for each section
- [ ] Publish the article
- [ ] Share the link

These render as interactive checkboxes on GitHub and in many editors, which makes them great for tracking progress in an issue or a README. Task lists, tables, and strikethrough are defined in the GitHub Flavored Markdown Spec.

Putting It All Together

You now have the full toolkit: headings to structure a document, bold and italic for emphasis, blockquotes for call-outs, lists for steps and bullets, links and images for references, tables for data, inline and fenced code for technical content, horizontal rules to separate sections, and task lists for tracking work. Almost everything else in Markdown is a small variation on these.

The fastest way to learn is to write and see the result instantly. Paste any example from this page into a live editor, change a symbol, and watch the output update.

Write and Preview Markdown

Our free Markdown Editor renders your text live as you type, with a split view for raw Markdown and formatted output. No signup, nothing uploaded, works entirely in your browser.

When a finished document needs to be shared as a PDF, IWantFreePDFTools.com offers free tools to convert, merge, and compress PDFs right in your browser.

Open Markdown Editor →