PreviewMD for Mac, iPad & iPhone
Get

Markdown Cheat Sheet

Everything PreviewMD renders, with the syntax that produces it. This document is itself Markdown — switch to Source to see how any of it is written.

Text

Type this You get
*italic* / _italic_ italic
**bold** bold
~~strikethrough~~ strikethrough
`inline code` inline code
\*not italic\* *italic*

A blank line starts a new paragraph. A single line break does not — end a line with two spaces to break inside one.

Headings

# Heading 1

Heading 2

Heading 3


One `#` per level, up to six. Keep a space after the hashes.

Lists

- Bulleted item
- Another item
  - Indent two spaces to nest

1. Numbered item
2. The numbers you type are ignored

- [x] Completed task
- [ ] Task still to do
  • Bulleted item
  • Another item
    • Indent two spaces to nest
  1. Numbered item
  2. The numbers you type are ignored
  • Completed task
  • Task still to do

Numbering is renumbered for you, so a list stays correct after you insert a line.

Quotes

> A quote.
>
> > And a quote inside it.

A quote.

And a quote inside it.

Alert callouts

Five types, exactly as GitHub renders them. The word must be uppercase and alone on the quote’s first line.

Note

Useful information the reader should notice.

Tip

A helpful shortcut.

Important

Something the reader must not skip.

Warning

Needs immediate attention.

Caution

Risk of a bad outcome.

Code

Fence with three backticks and a language name for syntax highlighting — almost two hundred languages are recognised.

```swift
func greet(_ name: String) -> String {
    "Hello, \(name)"
}
```
func greet(_ name: String) -> String {
    "Hello, \(name)"
}

Leave the language off for plain text. To show backticks themselves, fence the block with four of them.

Tables

Colons in the divider row set the alignment. The pipes need not line up — only the divider row matters.

| Left | Centre | Right |
|:---------|:----------:|----------:|
| a        |     b      |         c |
Left Centre Right
a b c

Math

KaTeX typesets both inline and display maths. Put $$…$$ on its own lines for a centred equation.

Type this You get
$E = mc^2$ E=mc2E = mc^2
\(a^2 + b^2 = c^2\) (a^2 + b^2 = c^2)
$$
\int_{0}^{\infty} e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}
$$

∫0∞e−x2 dx=π2\int_{0}^{\infty} e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}

Diagrams

A fence marked mermaid is drawn as a diagram, in light or dark to match your screen. Flowcharts, sequence, class, state, pie and gantt all work.

```mermaid
graph LR
  A[Write] --> B[Preview]
  B --> C[Export]
```
graph LR
  A[Write] --> B[Preview]
  B --> C[Export]

Footnotes

A claim that needs a source.[^1]

[^1]: The source, at the bottom of the document.

A claim that needs a source.[1]


  1. The source, at the bottom of the document. ↩︎

Emoji

GitHub’s shortcodes all work — :rocket:, :sparkles:, :warning: give 🚀 ✨ ⚠️

Horizontal rule

---

Front matter

A YAML block at the very top, between --- lines, is metadata — PreviewMD hides it rather than rendering it.

---
title: My document
date: 2026-01-31
---

Raw HTML

HTML passes through where Markdown has no equivalent — <kbd>⌘</kbd><kbd>S</kbd>, <sub>sub</sub>, <sup>sup</sup>, <mark>highlighted</mark>.

Keyboard shortcuts

Shortcut Does
⌘1 / ⌘2 / ⌘3 Preview · Split · Source
⌘4 Diff — greyed out until the document changes
⌘B / ⌘I Bold · italic
⌃⌘C Inline code
⌘K Insert link
⌃⌘L Show or hide the outline
⌃⌘R Show or hide document versions
⌘F Find, with replace
⇧⌘E Export as PDF
⌘P Print