How to Create Tables in Markdown
Writing tables in Markdown by hand is tedious. One wrong pipe character and it breaks. Here's the syntax — and a better way.
Basic Table Syntax
| Name | Age | City |
|-------|-----|---------------|
| Alice | 30 | New York |
| Bob | 25 | San Francisco |
| Carol | 28 | Chicago |
Renders as:
| Name | Age | City | |-------|-----|---------------| | Alice | 30 | New York | | Bob | 25 | San Francisco | | Carol | 28 | Chicago |
Column Alignment
| Left | Center | Right |
|:----------|:---------:|----------:|
| `:---` | `:---:` | `---:` |
| Aligns L | Aligns C | Aligns R |
The Easy Way: Visual Table Builder
Instead of counting pipe characters, use our Markdown Table Generator:
- Set your rows and columns
- Fill in cells like a spreadsheet
- Copy the generated Markdown
- Paste into your README, docs, or blog post
Table Tips
- Header row is required — every Markdown table needs column headers
- Alignment row is required — the second row (
|---|---|) defines alignment - Escaping pipes — use
\|to include a literal pipe character in a cell - Consistent columns — every row must have the same number of columns
Common Mistakes
❌ | A | B | C | ← Header
|---|---| ← Missing column!
| 1 | 2 | 3 |
✅ | A | B | C |
|---|---|---|
| 1 | 2 | 3 |
Related Tools
- Markdown Table Generator — visual builder
- Markdown Editor — live preview
- Markdown to HTML — convert tables to HTML