About the Markdown Table Generator
This Markdown table generator converts tabular data into a GitHub-Flavored Markdown (GFM) table. Paste rows copied straight from Excel, Google Sheets or Numbers (they arrive tab-separated), a CSV export, or semicolon- or pipe-separated text; the tool detects the delimiter, handles quoted fields with embedded commas, and writes the header row, the alignment row and every data row.
It is for developers writing README files, technical writers documenting APIs, and anyone posting tables to GitHub, GitLab, Reddit, Obsidian, Notion or a static-site generator. Choose left, center or right alignment for all columns or per column, and switch padding on to line the pipes up so the raw Markdown is as readable as the rendered table.
Pipe characters inside cells are escaped as \| and line breaks become <br> so they do not break the table. Rows with fewer cells than the header are padded with empty cells, because GFM requires every row to have the same column count to render reliably.
How to use the markdown table generator
- 1Paste your data — copied spreadsheet cells, CSV or another delimited format.
- 2Leave the delimiter on Auto-detect or pick it explicitly.
- 3Choose whether the first row is the header.
- 4Set an alignment for all columns, or type per-column codes like l,r,c.
- 5Copy the Markdown and paste it into your README, issue or document.
Formula and method
A GFM table is a header row, a delimiter row and any number of data rows, each written as cells separated by pipes. In the delimiter row each cell is at least three hyphens; a colon on the left means left-aligned, colons on both sides mean centered, and a colon on the right means right-aligned. With no colons the renderer uses its default (usually left).
The generator splits your input into rows and cells (respecting double-quoted CSV fields), pads short rows to the widest row, escapes | and backslashes, and — when padding is on — widens every cell to its column’s longest value (minimum three characters) so the pipes align in plain text. Wide CJK characters and emoji count as two columns.
Worked examples
Pricing table from CSV
The comma-separated input has a header and three data rows. Each column is padded to its longest value — "Storage" sets column three to 7 characters — so every pipe lines up, and the delimiter row uses plain hyphens because no alignment was chosen.
Spreadsheet paste with right-aligned numbers
Cells copied from a spreadsheet are tab-separated, which auto-detect recognises. The per-column code l,r,r left-aligns the item names and right-aligns both number columns, so the delimiter row becomes :----- | --: | ----: and the numbers are padded on the left.
Quoted CSV with a comma and a pipe, compact output
The quoted field "Smith, J." keeps its comma instead of splitting into two cells, and the pipe in "a|b" is escaped as \| so it does not start a new column. With padding off, the output is compact and the centered delimiter cells are the minimum :-:.
Frequently asked questions
How do I make a table in Markdown?+
Write a header row with cells separated by pipes, then a row of at least three hyphens per column (| --- | --- |), then your data rows in the same format. Most renderers that support GitHub-Flavored Markdown will display it as a table.
How do I align columns in a Markdown table?+
Use colons in the delimiter row: :--- for left, :---: for center and ---: for right alignment. The alignment applies to the whole column, including the header.
How do I put a pipe character inside a Markdown table cell?+
Escape it with a backslash as \|. GitHub, GitLab and most GFM renderers then show a literal pipe instead of starting a new cell. This generator escapes pipes automatically.
Can I add a line break inside a Markdown table cell?+
Plain Markdown tables do not allow multi-line cells, but most GFM renderers accept the HTML tag <br> inside a cell. The generator converts line breaks from quoted CSV fields to <br>.
Does standard Markdown support tables?+
Tables are not part of the original Markdown or CommonMark core; they come from the GitHub-Flavored Markdown extension, which is supported by GitHub, GitLab, Bitbucket, Reddit, Obsidian, many static-site generators and most Markdown editors.