Markdown Tables

Markdown tables are simple until they are not. Alignment, escaped pipes and ragged rows account for almost every table that renders wrong.

Each rule below shows the source next to the rendered table, so you can see exactly what the syntax does.

A basic table

Three ingredients: a header row, a separator row of dashes, and body rows. Pipes divide the columns.

You write
| Language | Extension | Typed |
|----------|-----------|-------|
| TypeScript | .ts | Yes |
| Python | .py | Optional |
| Rust | .rs | Yes |
You get
LanguageExtensionTyped
TypeScript.tsYes
Python.pyOptional
Rust.rsYes

The separator row is what makes it a table. Without it you get three lines of text with pipes in them.

Column alignment

Colons in the separator row set alignment: left, right, or both sides for centred. No colon means left by default.

You write
| Left | Centre | Right |
|:-----|:------:|------:|
| a | b | c |
| longer text | centred | 1,234 |
| x | y | 99 |
You get
LeftCentreRight
abc
longer textcentred1,234
xy99

Right-align numeric columns. Digits line up by place value and the column becomes scannable — this is the single highest-value habit in markdown tables.

Source does not need to line up

Pipes do not have to align in the source. Both of these render identically, so do not waste time padding cells by hand.

You write
| Setting | Default |
|---|---|
| Compression | Brotli |
| Encryption | Off |

| Setting     | Default |
|-------------|---------|
| Compression | Brotli  |
| Encryption  | Off     |
You get
SettingDefault
CompressionBrotli
EncryptionOff
SettingDefault
CompressionBrotli
EncryptionOff

Aligned source is nicer to read in a diff. Some editors format it for you on save — worth turning on, never worth doing manually.

Formatting inside cells

Inline markdown works in cells: bold, italic, links, inline code. Block elements like lists and headings do not.

You write
| Field | Type | Notes |
|-------|------|-------|
| `publicId` | `varchar(8)` | **Unique**, used in URLs |
| `content` | `text` | Brotli compressed |
| `isEncrypted` | `boolean` | See [encryption](/security) |
You get
FieldTypeNotes
publicIdvarchar(8)Unique, used in URLs
contenttextBrotli compressed
isEncryptedbooleanSee

Escaping pipes

A literal pipe inside a cell ends the cell early. Escape it with a backslash, or use the HTML entity.

You write
| Operator | Meaning |
|----------|---------|
| \| | Bitwise OR |
| \|\| | Logical OR |
| | | Also a pipe |
You get
OperatorMeaning
|Bitwise OR
||Logical OR
|Also a pipe

This bites most often when documenting shell commands. If a table is full of pipes, a fenced code block is usually the better shape.

Empty cells and ragged rows

Leave a cell blank to render it empty. Rows with too few cells are padded; extra cells are dropped.

You write
| Feature | Free | Notes |
|---------|:----:|-------|
| Syntax highlighting | Yes | |
| Encryption | Yes | AES-256-GCM |
| Expiry | | Planned |
You get
FeatureFreeNotes
Syntax highlightingYes
EncryptionYesAES-256-GCM
ExpiryPlanned

Silently dropping extra cells is the one to watch. If a column vanishes, count the pipes in your longest row.

Wide tables

Markdown has no column-width control. Wide tables scroll horizontally here rather than squashing the text.

You write
| Algorithm | Key size | Block size | Mode | Authenticated | Standardised |
|-----------|---------:|-----------:|------|:-------------:|-------------:|
| AES-GCM | 256 | 128 | AEAD | Yes | 2007 |
| AES-CBC | 256 | 128 | Block | No | 2001 |
| ChaCha20-Poly1305 | 256 | Stream | AEAD | Yes | 2015 |
You get
AlgorithmKey sizeBlock sizeModeAuthenticatedStandardised
AES-GCM256128AEADYes2007
AES-CBC256128BlockNo2001
ChaCha20-Poly1305256StreamAEADYes2015

Beyond about six columns, a table stops being readable on a phone. Consider splitting it, or use a definition-style list instead.

Copy and export

Every rendered table here gets controls for copying as Markdown, CSV or TSV, and for downloading a CSV. Hover the table to see them.

You write
| Quarter | Pastes | Encrypted |
|---------|-------:|----------:|
| Q1 | 12,480 | 3,120 |
| Q2 | 18,240 | 5,470 |
| Q3 | 24,900 | 8,215 |
You get
QuarterPastesEncrypted
Q112,4803,120
Q218,2405,470
Q324,9008,215

The CSV download is UTF-8 with a byte-order mark, so Excel on Windows reads accented characters correctly instead of mangling them.

Share a table

Paste a markdown table and get a link that renders it properly — with copy as Markdown, CSV or TSV, and a CSV download. No signup.