How to Write Markdown Tables
Alignment, centering, and line breaks
A table in Markdown is drawn with pipes | to separate columns and a row of --- to divide off the header. It looks simple, but a lot of people get stuck on "why didn't mine render as a table" — usually a missing separator row.
AI answers are full of tables (ChatGPT and Claude love them for laying out information), and to tweak one or write your own you need this syntax. This article covers the basic form, left/center/right alignment, and line breaks and escaping inside cells, then how to write while seeing the formatting so you're not counting pipes by hand.
If you just want the Markdown basics first (headings, lists, bold), read How to Write Markdown, then come back for tables.
What the simplest table looks like
Three lines get you a table:
| Tool | What it's for | Price |
|------|---------------|-------|
| NoteLoom | Read/write local md in the browser | Free |
| Notepad | Open plain text | Free | It has three parts:
- Header row:
| Tool | What it's for | Price |— the column titles. - Separator row:
|------|------|------|— required; it uses-to divide the header from the body, and it's how Markdown recognizes "this is a table." - Data rows: each line below is one record; just match the column count of the header.
The one thing to remember: drop that --- row and it isn't a table — just some lines with pipes in them.
Alignment: left, center, right
Use a colon : in the separator row to control each column's alignment — the content leans toward whichever side the colon is on:
| Alignment | Separator syntax | When to use |
|---|---|---|
| Left | :--- or --- | The default; text columns |
| Center | :---: | Titles and short labels |
| Right | ---: | Numbers and amounts — looks tidier |
All together:
| Left | Center | Right |
|:-----|:------:|------:|
| name | status | amount |
| a longer cell | done | 1280 | Memory aid: the content leans toward the side the colon hugs; a colon on both sides means center.
Line breaks and pipes inside a cell
- Line break: a cell is one line by default; to break inside it use a
<br>tag, not a literal Enter (Enter breaks the table apart). - Literal pipe: to show a
|inside cell content, escape it with a backslash —\|— so it displays as a plain character instead of splitting the column. - Too much content: rather than stuffing a cell, split into columns or switch to a list — tables are for structured short bits, not long paragraphs.
Using a table an AI gave you
The tables ChatGPT or Claude hand you are already plain-text Markdown (just | and ---). So:
- Copy it and it's ready: paste into any Markdown editor and it renders as a formatted table — no need to redraw it.
- Notepad shows the symbols: that's not broken, just unrendered — switch to an editor that displays Markdown. For why AI uses these symbols, see Why AI uses Markdown.
- Saved, it's a .md file: to keep and edit it locally, see How to keep the formatting of an AI answer.
Write tables while seeing them with NoteLoom
Tables are the hardest thing to picture from source — a wall of pipes. NoteLoom is an editor that reads and writes local md files right in the browser, and its live view is made for this: as you type the |, the table renders in real time, so misaligned or missing cells jump out at once.
Let's be clear about the boundaries: NoteLoom has no AI whatsoever — it won't generate tables for you or auto-complete content. It only renders your Markdown live, lets you fix it, and saves it back locally.
Each view helps with tables:
live: edit while seeing the formatting — easiest for adjusting alignment and filling cells.reading: read-only; see the whole finished table calmly.source: see the raw|and---to check the separator row and escaping.
How you use it: open app.noteloom.cc in Chrome / Edge / Arc → mount a local folder → create or open a .md → type the table in live and adjust as you watch → save back to your disk, no cloud, no account.
Common pitfalls
| Pitfall | What happens | Result |
|---|---|---|
| Missing separator row | No |---|---| under the header | The whole thing isn't a table — just lines with pipes |
| Column count mismatch | A row's cell count differs from the header | Extras are dropped, gaps left blank — easy to misalign |
| Enter inside a cell | You wanted a line break but pressed Enter | The table breaks there; use <br> instead |
| Unescaped pipe | A cell's content itself contains | | It splits the column; escape it as \| |
And one mental-model pitfall: standard Markdown tables can't merge cells. For merging or row/column spans, use an HTML table or another approach — don't expect plain Markdown to draw an Excel-style table.
FAQ
Do the pipes in a Markdown table have to line up?
Can a cell contain a line break?
How do I put a literal pipe | inside a cell?
Can Markdown tables merge cells?
How do I open a Markdown table an AI gave me?
Can NoteLoom generate a table for me?
Can I write tables with NoteLoom on my phone or in Safari?
Write it and watch it — no more counting pipes
Open NoteLoom in Chrome / Edge / Arc, mount a local folder, and type | in the live view to see the table render in real time — alignment and column counts obvious at a glance. Save back to your disk, no software to install and no account to sign up for.