Markdown Table Generator
How it works
Every line of the pasted text becomes one table row, split on whichever delimiter the first
line contains (a tab if there is one, a comma otherwise). Each column is padded, in the raw
Markdown, to its widest cell — including the header — so the source is readable even before
it renders anywhere. Choosing left, center or right for a column adds the matching colon(s)
to its separator row (:---, :---:, ---:); leaving a
column unset keeps its separator plain (---), which every Markdown renderer
treats the same as left-aligned.
Frequently asked questions
How is the delimiter (comma vs tab) detected?
By looking at the first line of your paste: if it contains a tab character, every line is split on tabs (what copying a range straight out of a spreadsheet produces); otherwise every line is split on commas. It is a simple, first-line heuristic on purpose, not a full CSV parser — quoted fields containing a comma or tab are not unquoted for you.
Why is a column sometimes wider than its longest word?
A centered or right-aligned column needs its separator to fit the alignment colon(s) — `:-:` for center, `-:` for right — which take up 3 and 2 characters respectively. If every cell in that column is shorter than that, the column is widened just enough to fit the separator, so the whole table still lines up under monospace font.
Does the preview below use this codebase's Markdown previewer?
No — that previewer's renderer does not support GFM tables at all (by design; see its own page for what it covers), so a table pasted through it would show as literal pipe characters. The preview here is built directly from the same parsed rows and alignment choices as the Markdown output, just rendered as an actual HTML table instead of Markdown text.