Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path
Markdown Table Generator
A Markdown table generator. Paste comma- or tab-separated data and get a properly aligned Markdown table you can drop into a README, a pull request, or docs — with a live rendered preview and a choice of column alignment. Everything runs in your browser.
| Name | Role | Commits | | :---- | :------------ | :------ | | Ada | Engineer | 421 | | Grace | Compiler Lead | 1980 | | Linus | Kernel | 99999 |
| Name | Role | Commits |
|---|---|---|
| Ada | Engineer | 421 |
| Grace | Compiler Lead | 1980 |
| Linus | Kernel | 99999 |
Markdown tables are simple to render but tedious to type by hand. The format is rows of cells between pipes with a separator line under the header, and lining up the columns so the raw source is readable is exactly the kind of fiddly work a tool should do. This generator takes data you already have and returns a table ready to paste.
What it computes
A Markdown table, in the GitHub Flavored Markdown style most sites render, has three parts: a header row, a separator row of dashes, and one row per record. Colons in the separator set alignment. The tool builds it in five steps:
- Split the input into lines, dropping empty ones. The first line is the header.
- Choose the delimiter: tab if any line contains a tab, otherwise comma. Split every line on it and trim each cell.
- Escape every
|in a cell as\|, and pad short rows with empty cells to the widest row’s column count. - Set each column’s width to its longest cell, at least 3 characters.
- Write each row as
| cell | cell |, padding cells to the column width, and write the separator with the chosen markers::---left,:---:center,---:right.
Cells are padded on the right for left alignment, on the left for right alignment, and on both sides for center, so the raw text mirrors how the table will render.
A worked example
The default input is four comma-separated lines: a header of Name, Role and Commits, then rows for Ada, Grace and Linus. There are no tabs, so the delimiter is a comma. The widest cells are Grace and Linus at 5 characters, Compiler Lead at 13 and Commits at 7, so those are the column widths. With left alignment the output is:
| Name | Role | Commits |
| :---- | :------------ | :------ |
| Ada | Engineer | 421 |
| Grace | Compiler Lead | 1980 |
| Linus | Kernel | 99999 |
Each separator cell is a colon plus dashes filling the column width. Choose Right and every column flips: the separators become ----:, ------------: and ------:, and the cells are padded on the left, which suits the numbers but also moves the names to the right.
Assumptions and limits
- No CSV quoting. Commas inside quoted values still split cells, and the quote marks stay in the output. Paste tab-separated data to avoid it.
- One delimiter for the whole input. A single tab anywhere switches every line to tab splitting.
- One alignment for every column. Mixed alignment means editing the separator row by hand.
- Character counts, not display widths. Wide characters such as emoji or Chinese text take more screen columns than they count for, so their raw columns may not line up; the rendered table is unaffected.
- No inline formatting changes. Asterisks, backticks and links pass through as typed and render as Markdown.
How to use the result
- Copy from a spreadsheet rather than exporting CSV; the clipboard’s tab-separated format survives commas in values.
- Right-align number columns by hand when a table mixes text and numbers, so digits line up.
- Keep tables narrow. More than six or seven columns, or long sentences in cells, read badly on phones; split the table or move prose out of it.
- Check the preview before pasting, especially after escaping pipes.
How it works
- Detects comma or tab delimiters (paste straight from a sheet).
- Emits a padded Markdown table with a live preview.
- One left, center or right alignment for all columns via separator colons.
- Escapes pipe characters so cells never break the table.
Frequently asked questions
How do I use it?
Paste your data with the first row as the header, using commas or tabs between columns. Copying a range straight out of a spreadsheet gives tab-separated values, which works directly. The tool picks the delimiter, builds a Markdown table with a header separator row, pads the columns so the source lines up, and shows a rendered preview. Copy the Markdown and paste it into any file or comment that renders tables, such as a GitHub README, an issue or a pull request.
How does column alignment work in Markdown?
Markdown sets alignment with colons in the separator row beneath the header: a colon on the left, as in :---, means left-aligned; colons on both ends, :---:, mean centered; and a colon on the right, ---:, means right-aligned. This tool applies the alignment you pick to every column at once. To right-align only a numeric column, edit that column’s marker in the separator row after copying. GitHub and most documentation tools honor these markers.
What if my data contains a pipe character?
The pipe is the column separator in Markdown tables, so a literal pipe inside a cell would split it into two. This tool escapes every pipe in your data with a backslash so the table stays intact, and the rendered table shows a plain pipe. Line breaks inside a cell are not supported by Markdown tables at all, so keep each record on one line; some renderers accept an HTML line-break tag inside a cell if you need one.
Why did a comma inside quotes split my cell?
The tool splits each line on every comma, or on every tab when any line contains a tab, and does not interpret CSV quoting. A value such as "Doe, Jane" therefore becomes two cells. The simplest fix is to paste tab-separated data instead, which is what spreadsheets put on the clipboard, or to export the CSV with a different delimiter. Rows with fewer cells than the widest row are padded with empty cells.
Why do the extra spaces in the raw Markdown not matter?
The generator pads each column to its widest value, with a minimum of three characters, so the raw Markdown lines up in a monospace editor and stays readable as source. Those spaces are cosmetic: renderers ignore the padding and lay the table out from the pipes and the separator row. So the same text looks tidy when someone reviews the raw file and renders correctly on the page, with no difference in the final table.