Table syntax, explained properly
A markdown table is three kinds of line. The header row is cells separated by pipes. The delimiter row beneath it — dashes, at least three per column in strict parsers — is what makes the parser treat the block as a table at all; forgetting it is the #1 reason "my table shows as plain text." The body rows follow the same pipe pattern. Leading and trailing pipes are optional in most parsers but recommended: they survive re-wrapping and read unambiguously. Column widths in the source are purely cosmetic — the generator pads them so the raw text lines up, but a ragged table renders identically.
Alignment syntax
| Delimiter cell | Alignment | Note |
|---|---|---|
| --- | Default (left in most renderers) | No colon — the renderer decides. |
| :--- | Left | Explicit left, identical look to default almost everywhere. |
| :---: | Center | Both colons. |
| ---: | Right | The one worth using — numbers should be right-aligned. |
Alignment applies per column, set once in the delimiter row — there is no per-cell alignment in markdown. The ⟸/⟺/⟹ buttons in the grid's alignment row above write these colons for you.
How the spreadsheet paste works
When you copy cells from a spreadsheet, the clipboard carries the range as tab-separated text — one tab per column boundary, one newline per row. Paste that into the grid or the paste box and it's split accordingly. If the pasted text contains no tabs, it's treated as CSV and run through a real CSV parser: quoted fields may contain commas, doubled quotes ("") become literal quotes, and quoted fields may even span lines — the three cases that break split-on-comma converters and mangle any exported cell that contains a comma. Cells containing pipes or newlines are then escaped on the way into markdown, so the round trip from sheet to rendered table is safe end to end.
The JSON and HTML modules
JSON array → HTML table takes an array of objects — the shape every API returns — collects the union of keys across all objects as columns (missing keys render as empty cells), and emits a clean <table> with header, escaped cell content, and no styling to fight. HTML table → JSON is the inverse: paste a table element (scraped, exported, or emailed), and the first row's cells become keys for an array of row objects. Nested tables and cells spanning rows or columns don't map to flat JSON — colspan/rowspan cells are read as single cells, which is the honest behavior short of inventing data.
Frequently asked questions
How do I put a pipe character inside a cell?
Escape it: \|. An unescaped pipe is a cell boundary, so a|b in one cell silently becomes two cells — the single most common way tables break. The grid above escapes pipes automatically when generating markdown, and unescapes them when converting markdown back to CSV, so the round trip preserves them.
Can a cell contain a line break?
Not a literal one — a newline ends the table row. The working convention is an HTML <br> inside the cell, which most renderers honor (GitHub included). Type multi-line content into a grid cell by pasting it, and the generator writes the <br> for you. Renderers that strip HTML will show the tag as text — there's no pure-markdown line break inside a table cell.
Do the columns in my markdown source need to line up?
No — padding is cosmetic. |a|bbbb| renders identically to a perfectly padded version. This generator pads by default because aligned source is pleasant to read in diffs and code review, and offers the compact toggle for when every byte counts (or when cells are so long that padding is hopeless anyway).
Is my pasted data uploaded anywhere?
No. Parsing, conversion, and preview all run in your browser tab — no server, no CDN library, and the page works offline once loaded. Spreadsheet exports tend to contain names, prices, and internal numbers; that's exactly why they shouldn't transit a stranger's server to become a table.