Vibe Engines
YouTube

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.

Align
| Name  | Role          | Commits |
| :---- | :------------ | :------ |
| Ada   | Engineer      | 421     |
| Grace | Compiler Lead | 1980    |
| Linus | Kernel        | 99999   |
NameRoleCommits
AdaEngineer421
GraceCompiler Lead1980
LinusKernel99999

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:

  1. Split the input into lines, dropping empty ones. The first line is the header.
  2. Choose the delimiter: tab if any line contains a tab, otherwise comma. Split every line on it and trim each cell.
  3. Escape every | in a cell as \|, and pad short rows with empty cells to the widest row’s column count.
  4. Set each column’s width to its longest cell, at least 3 characters.
  5. 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.

Trade-offs 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.

Each of these inputs was run through the tool’s own steps. The quiet ones are the risk: the table renders, just not as you meant.

InputWhat the tool doesWhat you get
"Paris, FR", capital under a two-column headerSplits on both commasCells "Paris and FR", plus a third column with an empty header
A row with 3 cells under a 2-cell headerPads every row, header included, to 3A column with a blank heading
A line of only spacesKeeps it as a rowAn empty row mid-table
One tab on any lineSplits every line on tabs onlyx, y on a comma line stays one cell
a|b in a cellWrites a\|bWidth counted as 4; renders as a|b

Padding the header matters more than it looks. Under the GitHub Flavored Markdown spec, a header row and separator row with different cell counts is not a table at all and renders as plain text. Body rows are forgiving: missing cells render empty and extra cells are dropped. Because the tool pads every row to the widest, its output always parses as a table.

Padding has a cost in the source. Every row is padded to the widest cell in its column, so one 80-character cell makes that column 80 characters wide on every line, and a table that renders neatly can wrap badly in a code review. If one cell is far longer than the rest, shorten it, or move the detail into a sentence under the table.

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.

When to use it, and when not

Use it when the data already exists in a spreadsheet, a CSV export or a query result and needs to land in a README, a pull request description, an issue or a docs page built from Markdown. Small comparison tables, option lists and benchmark summaries are the sweet spot: a few columns, short cells, rows you can read on a phone.

Look elsewhere when cells need line breaks, lists or merged spans, which Markdown tables cannot express; write an HTML table instead. Tables are an extension, not part of core CommonMark, so a renderer without the GitHub Flavored Markdown extension shows raw pipes. And if the data changes weekly, generating the table by hand each time drifts; link to the source file or generate the table in your build.

Common mistakes

  • Pasting CSV with quoted commas. "Doe, Jane" becomes two cells, the row gains a column, and every row after it is padded to match. Copy the cells from the spreadsheet instead, which puts tabs on the clipboard.
  • Expecting per-column alignment. Right moves every column, names included. Generate with Left, then change only the number column’s marker to ---: by hand.
  • Re-padding after an edit. The padding is for people reading the source. A cell edited later without re-aligning still renders correctly, so a whitespace-only commit is wasted churn.
  • Removing the backslash from \| inside code. Backticks do not protect a pipe in a table cell: GitHub Flavored Markdown splits cells before it reads code spans, so `a|b` still breaks the row. Keep the escape; the backslash does not render.
  • Leaving a stray line of spaces. Only truly empty lines are dropped. A line holding a few spaces becomes a blank row.

Check yourself

Input Plan, Price, Free, 0, Pro, 12, left-aligned. What is the separator row?

Column widths are the longest cells: Plan at 4 and Price at 5, both above the minimum of 3. Left alignment writes a colon plus width − 1 dashes, so the row is | :--- | :---- |.

Centered, the Role column is 13 wide. Where do the spaces around Role go?

The gap is 13 − 4 = 9. The left side gets floor(9 / 2) = 4 and the right side the other 5, so an odd gap always leans right: the cell reads ····Role·····, with each dot a space.

Input City, Note then "Paris, FR", capital. How many columns, and what is in the header?

Three. The data row splits on both commas into "Paris, FR" and capital, so every row is padded to 3 and the header gains an empty third cell. Pasting tab-separated data keeps Paris, FR as one cell.

Line one is a, tab, b. Line two is x, y, tab, z. What are the cells of row two?

A tab exists, so every line splits on tabs only. Row two has two cells, x, y and z; the comma is ordinary text. The first column is 4 wide, from x, y.

Ada, Engineer, 421 Ada Engineer 421 widths5 · 13 · 7 | Ada   | Engineer      | 421     | separator row: one alignment for all columns :---- left :---: center ----: right
One row of the default input, step by step. Widths come from the longest cell in each column across all rows, so one long value pads its whole column; the colons in the separator, not the padding, tell the renderer how to align.

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.