Markdown Table Syntax
Write Markdown tables with pipes and dashes, set column alignment, and keep them readable in the editor before you paste.
Direct answer
A Markdown table uses pipes ( | ) to separate columns and a dash row ( --- ) under the header to define it. Add a colon in the dash row to align columns: :--- is left, :---: is center, and ---: is right. Type it in a live editor to confirm the columns line up before pasting.
Open the Markdown EditorWhen to use this
- You need a table in a README, GitHub issue, or docs page.
- You want to control left, center, or right column alignment.
- Your table looks broken and you need to check the pipe and dash structure.
Steps
- Write the header row with a pipe between each column name.
- Add a second row of dashes ( --- ) with one entry per column.
- Add a colon to the dash row to set alignment: :--- left, :---: center, ---: right.
- Add one data row per line, keeping the same number of pipes.
- Preview the table so you can confirm every row has matching columns.
Example
| Feature | Free | Pro | | :--- | :---: | ---: | | Live preview | Yes | Yes | | Export HTML | No | Yes | | Price | $0 | $9 |
Feature | Free | Pro (left) |(center)| (right) ------------- | ------ | ----- Live preview | Yes | Yes Export HTML | No | Yes Price | $0 | $9
Common mistakes
- Every row must have the same number of pipes, or the table falls back to plain text.
- The dash row under the header is required; without it the block is not treated as a table.
- Outer pipes are optional but keep them for readability so misaligned rows are easy to spot.
FAQ
- How do I align columns in a Markdown table?
- Add a colon in the dash separator row. :--- aligns left, :---: centers, and ---: aligns right. Columns without a colon default to left alignment.
- Why is my Markdown table not rendering?
- The most common cause is a missing dash separator row under the header, or a data row with a different number of pipes than the header. Check both in the live preview.
- Can I put a pipe character inside a table cell?
- Yes, escape it with a backslash ( \| ) so the renderer treats it as text instead of a column divider.
Related Markdown guides
Related tools
Related Markdown editor guides
Markdown Syntax Cheat Sheet
A copy-ready Markdown cheat sheet covering headings, bold, italics, lists, links, images, code, tables, and blockquotes.
How to Write a README in Markdown
Structure a clear README.md with a title, badges, install and usage sections, and a live preview before you commit.
Markdown for GitHub Comments
Format GitHub issue and pull request comments with task lists, code blocks, mentions, and collapsible sections.
Markdown Editor With Live Preview Online
Edit Markdown on the left and see the rendered result on the right in real time, with no login and browser-only drafts.
How to Add Links and Images in Markdown
Add inline links, reference links, and images in Markdown, including titles and clickable image links.
Markdown Task List and Checkboxes
Create checkbox task lists in Markdown for READMEs, GitHub issues, and personal to-do notes with live preview.
Markdown Code Blocks and Syntax Highlighting
Add fenced code blocks with a language for syntax highlighting, plus inline code, in Markdown.
Desk gear for long writing sessions
A few things that help if you write docs, tickets, and specs on a laptop all day.
Anker 5-in-1 USB-C Hub
One cable turns a laptop into a desk setup. Drives a 4K display, charges at up to 85W, and adds three data ports.
- 4K HDMI output
- 85W max power delivery
- 1x USB-C + 2x USB-A, 5Gbps each
- MacBook Pro, MacBook Air, Dell
Dell 27" S2725QC 4K
The monitor I write and review documents on. 163 PPI keeps small text sharp, and USB-C carries video and power on one cable.
- 3840x2160 IPS, 163 PPI
- 120Hz, 4ms, FreeSync Premium
- 99% sRGB
- USB-C, HDMI, DisplayPort
Apple MacBook Neo 13" (A18 Pro)
The cheapest way into an Apple-silicon machine that runs local models. Fanless, and the Liquid Retina panel holds small text at a full day of reading.
- A18 Pro chip, built for Apple Intelligence
- 8GB unified memory, 256GB SSD
- 13-inch Liquid Retina display
- 1080p FaceTime HD camera
Amazon affiliate links. We earn a commission on qualifying purchases at no extra cost to you.