Skip to content

Guide

The Markdown syntax guide

A printable cheat sheet covering everything from headings to GitHub Flavored Markdown.

Markdown guide

Markdown is a lightweight markup language for formatting plain text. This guide is the only page you'll need to bookmark — it covers core syntax, GitHub Flavored Markdown, and the extras our editor adds on top (math, diagrams, emoji shortcodes).

Headings

# H1
## H2
### H3

Emphasis

**bold** _italic_ ~~strikethrough~~ `inline code`

Lists

- Bullet
- Bullet

1. First
2. Second

- [x] Done
- [ ] To do
[Markdown Viewer](https://trymarkdownviewer.com)
![Alt](https://example.com/img.png)

Code blocks (with syntax highlighting)

\`\`\`ts
const greet = (name: string) => `Hello, ${name}!`;
\`\`\`

Tables (GFM)

| Feature      | Status |
| ------------ | :----: |
| Live preview |   ✅   |

Math (KaTeX)

Inline math uses single $; block math uses double $$.

Inline: $a^2 + b^2 = c^2$

Block:

$$
\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}
$$

KaTeX styles load lazily — only the first time math is detected in a document.

Diagrams (Mermaid)

Mermaid renders flowcharts, sequence diagrams, class diagrams, and more from a fenced code block:

\`\`\`mermaid
flowchart LR
  Idea --> Draft --> Review --> Publish
\`\`\`

The Mermaid runtime is fetched on demand — documents without diagrams pay zero overhead.

Emoji shortcodes

:smile: :rocket: :tada: :heart: :100: :coffee:

Supports the ~250 most common shortcodes — see the Markdown cheat sheet for the full list.

Footnotes

Text with a footnote.[^1]

[^1]: Footnote body — rendered at the bottom of the document.

Blockquotes

> A blockquote.

Horizontal rule

---

GFM extensions at a glance

  • Task lists- [ ] item / - [x] item
  • Autolinks — bare URLs become clickable
  • Footnotestext[^1] and [^1]: explanation
  • Strikethrough~~text~~
  • Tables — pipe-and-dash with alignment

Editor power features

These aren't Markdown syntax — they're things you can do inside the Markdown Viewer editor:

  • Find & replace with regex — Ctrl/⌘ + F
  • Beautify to normalize whitespace and lists — Ctrl/⌘ + Shift + F
  • Focus mode hides every UI chrome — Ctrl/⌘ + .
  • Outline sidebar to jump between headings
  • Auto-generated TOC insertion
  • Readability stats — Flesch score, sentence length, top words
  • Smart paste — rich HTML on the clipboard auto-converts to Markdown
  • One-click export to PDF, HTML, or .md (PDF downloads directly, no print dialog)

Common gotchas

  • Leave a blank line before a list, table, or fenced code block.
  • Use two trailing spaces or a blank line to create a line break inside a paragraph.
  • Pipes (|) inside table cells need to be escaped as \|.
  • Most renderers sanitize raw HTML for security — we do too.

Need a converter or other tool?

Browse the full tools index — HTML to Markdown, Markdown to PDF, a visual table generator, and more.

Practice it

Open the editor and paste any snippet above to see it rendered live.