Markdown table generator
Processed in your browser · nothing is uploaded
Turns tab- or comma-separated data into a markdown table with the columns padded so the source is readable, and tidies an existing table the same way.
How to use the markdown table generator
Copying cells from a spreadsheet puts tab-separated text on the clipboard, and reading that directly is what makes a straight paste work. Which delimiter is assumed depends on the paste itself: a single tab anywhere in it makes the whole thing tab-separated, and otherwise it is read as CSV, quotes and all, so a field written as "Doe, Jane" survives as one cell. A semicolon-separated export out of a European Excel is neither, and comes through as a single column; swap the semicolons for commas in find and replace first.
The padding is the reason to bother. Markdown itself ignores the extra spaces and renders a ragged table identically, but a ragged table is close to unmaintainable in a text editor, and every table in a real repository is padded for that reason. Padding is measured in code units rather than in how wide a character prints, so Latin text lines up exactly and anything double-width does not: a column of Chinese, Japanese or Korean will look a character or two narrow in a monospaced editor, and an emoji counts as two even though it prints as one. The table still renders correctly either way, since the alignment is only for whoever opens the source next.
Tidying an existing table regenerates the widths but reads the alignment off the separator row you pasted and writes it back, so a centred or right-aligned column stays that way. A table arriving with no separator row at all, or a broken one, gets a fresh left-aligned row rather than an error message, since a broken separator means the table was not rendering in the first place. Two things do not survive the trip. An escaped pipe is the first: GFM says a \| inside a cell is a literal pipe, and this splits on every pipe it sees, so a cell containing one is torn in two and every column after it shifts along. Take pipes out before pasting, or write them as |. A line break inside a quoted CSV cell is the second, and it fails quietly: the row is cut at the break and the remainder of it is dropped rather than wrapping or erroring, so flatten those cells before pasting and use <br> where a line genuinely has to wrap.
What people use it for
- Putting a range of spreadsheet cells into a README
- Repairing a separator row that stopped a table rendering
- Realigning a table after a longer value went into a column
- Writing a comparison table into a pull request description
- Getting a table into a ticket or a wiki that takes Markdown
Questions
Spreadsheets put tab-separated text on the clipboard, and that is exactly what this reads.
No. Markdown ignores the extra spaces. It is entirely for whoever edits the source next.
The separator row controls it: a colon on the left, the right, or both. Generate the table, edit the colons, then tidy it again and the widths are redone around your choice.
No. The colons on the row you paste are read and written back out, so only the widths are recalculated.
Yes, choose tidy. A missing or malformed separator row is replaced with a fresh left-aligned one, which is normally what a broken table needs.
It splits the cell, and escaping it as \| does not help here even though GFM accepts that form. Remove the pipe first or write it as the HTML entity | instead.
A pipe inside one of the cells. Everything to the right of it moved along by one, and the header row grew an empty cell to match.
Padding counts characters, not printed width, and those characters occupy two columns in a monospaced font. The rendered table is still correct; only the source looks uneven.
Yes. Without a tab in the paste the input is parsed as proper CSV, so "Doe, Jane" stays in one cell.
Not as it stands: it comes out as one column. Replace the semicolons with commas in find and replace first, then paste it in.
It is padded out with empty cells to match the widest row, so the table stays rectangular and renders.
No, and the failure is silent rather than loud: the row is cut at the break and everything after it on that row is dropped, with no error. Take the breaks out before pasting. Markdown tables cannot hold one either, so use <br> inside the cell where you need a line to wrap.
Because a delimiter cell needs room for its dashes and its alignment colons, and a left-aligned one is written as :-- . Three is the conventional minimum and keeps the row readable at any column width.