About this tool
Markdown tables are easy to read once they exist and tedious to type: every cell needs pipes on both sides, the header needs a separator row of dashes, and one missing pipe shifts a whole column. This generator builds the table from data you already have — a CSV file, a range of cells copied from a spreadsheet, or rough pipe-separated rows — and shows a live preview of how it will render. Everything happens in your browser.
How to use the Markdown Table Generator
- Paste your data. Copying cells from Excel or Google Sheets pastes them as tab-separated text, which is detected automatically. CSV and pipe-separated rows work too.
- Choose alignment for the columns and whether the first row is a header. If it isn't, generic headers (Column 1, Column 2…) are added, because a Markdown table must have a header row.
- Click Generate table, check the preview, then copy the Markdown into your README, issue, pull request, wiki or docs page.
What the generator takes care of
- The separator row. Markdown needs a line of dashes under the header; its colons set the alignment —
:---left,:---:centre and---:right. - Pipe characters inside cells are escaped as
\|so they don't split the cell in two. - Line breaks inside a cell (possible in quoted CSV or spreadsheet cells) are turned into
<br>, which GitHub and most Markdown renderers display as a line break inside the cell. - Uneven rows are padded with empty cells so every row has the same number of columns.
- Quoted CSV is parsed properly, so a value like
"Smith, John"stays one cell. - Padding. With "Pad columns" on, cells are padded with spaces so the pipes line up in the raw Markdown. Renderers ignore the extra spaces, but aligned source is much easier to edit later.
Worked example
Paste these three rows of CSV:
Plan,Price,Users Free,$0,1 Team,$12,10
With "Right" alignment and padding on, the generator produces:
| Plan | Price | Users | | ---: | ----: | ----: | | Free | $0 | 1 | | Team | $12 | 10 |
Right alignment suits number columns because the digits line up by place value when the table renders. In a real document you'd usually want the Plan column left-aligned and the numbers right-aligned; since this tool applies one alignment to every column, edit the colons in the separator row afterwards — the rule is just where the colon sits.
Where Markdown tables work
Tables aren't part of the original Markdown syntax; they come from extensions, most commonly the table rules in the GitHub Flavored Markdown spec. GitHub, GitLab, Bitbucket, Notion, Obsidian, most static site generators and many documentation tools support that format. A few older or minimal renderers don't, and will show the raw pipes instead. You can check a table in the Markdown Previewer before publishing.
Common use cases
- Adding a comparison or options table to a project README
- Pasting spreadsheet results into a GitHub issue or pull request description
- Documenting API parameters, environment variables or configuration options
Things to watch out for
Padding counts characters, so columns containing emoji or wide characters such as Chinese or Japanese text may not line up perfectly in the raw Markdown — the rendered table is unaffected. Markdown tables also have no way to merge cells or span rows; if you need that, you'll need an HTML table instead.
The table rules that matter, from the GFM spec
The GitHub Flavored Markdown spec defines tables in a few short rules, and most "my table will not render" problems break one of them:
- The header and separator rows must have the same number of cells. If they differ, the spec says the text is not recognized as a table at all and shows as plain text with pipes.
- Body rows can be uneven. Missing cells are filled in as empty and extra cells are ignored, so an unescaped pipe inside a cell's text can silently drop data. This generator pads short rows for you so nothing is lost.
- The separator row is just hyphens, with optional colons for alignment. The spec does not require three hyphens, although this tool always writes at least three because they are easier to read.
- Block-level content is not allowed in cells. Lists, headings, code blocks and multiple paragraphs cannot go inside a table cell.
Formatting inside cells
Inline formatting does work: **bold**, *italic*, links and `code` render normally inside a cell. One detail catches people out. Per the GFM spec, a pipe must be escaped as \| even inside a code span, so a cell showing the shell command ls | wc -l has to be written with \|. This generator escapes every pipe in your data automatically. Since lists are not allowed, the usual workaround for several items in one cell is <br> between them, which is also what the tool uses for line breaks inside a CSV cell.
Reformatting an existing Markdown table
To re-align or tidy a table you already have, paste it in with the input format set to Pipe or Auto-detect. The tool splits each row on unescaped pipes, drops the leading and trailing pipes, and removes the old separator row so it can write a new one. It only recognizes a separator whose cells have at least three hyphens, such as |---|:---:|. A compact separator like |-|-| is kept as an ordinary data row, so change it to three hyphens before pasting, or delete that line from the output afterwards. Check the result in the Markdown Previewer, or turn table data into JSON with CSV to JSON.
Frequently asked questions
Yes. Copied cells are pasted as tab-separated text, which the auto-detect recognises, and each cell becomes a cell in the Markdown table.
Alignment is set with colons in the separator row under the header: :--- for left, :---: for centre and ---: for right. This tool applies the alignment you choose to every column, and you can edit individual colons afterwards.
It is escaped as \| so it appears as a literal pipe instead of splitting the cell.
Yes. The table format used by GitHub and most renderers requires a header row followed by a separator row. If your data has no header, the tool adds generic Column 1, Column 2 headers.
No. The table is generated in your browser, and nothing is sent to a server.
Check three things. The header row and the separator row of dashes must have the same number of cells, or the table is not recognized. The renderer must support GitHub Flavored Markdown tables, which basic Markdown does not include. And the separator row may contain only hyphens, colons, pipes and spaces.
Under the GitHub Flavored Markdown spec, each separator cell needs only hyphens, with optional colons for alignment, and no minimum of three is stated. This generator writes at least three per cell, and more when padding is on, because a wider separator makes the raw table easier to read.
Not with a normal line break, because each line of text is a new table row. Use the HTML tag br inside the cell instead, which GitHub and most Markdown renderers display as a line break. This tool converts line breaks inside quoted CSV or spreadsheet cells to br automatically.