Markdown Table Generator — From Pasted Rows
Paste rows from a spreadsheet and get a Markdown table — with the alignment set per column and the pipes escaped for you.
—
What this tool does
It turns a grid of text into a Markdown table. The usual source is a spreadsheet: you copy a block of cells, paste it here, and the tab-separated rows arrive already split into columns. From there you set the alignment for each column and copy the finished Markdown — no aligning pipes by hand, which is the tedious part of writing a table in Markdown.
The Markdown table syntax
A Markdown table is a header row, a separator row that sets the alignment, then the body rows — each row a line with cells between pipes:
| Name | Age | | :--- | ---: | | Ann | 30 | | Bob | 25 |
The :--- means left-aligned and ---: right-aligned; :---: centres.
The separator row is what tells the renderer how each column aligns.
Right-aligning numbers
A small choice that makes a big difference: right-align any column of numbers. Digits of different lengths — 5, 40, 1000 — line up at their last character, so the magnitude is readable at a glance, while left-aligned they look ragged. Text columns read better left-aligned, and short labels or status words often look best centred.
What the parser does with awkward input
The input is split line by line, and each line is split on one separator chosen per line: a tab if the line has one, otherwise a pipe, otherwise a comma. That covers what a spreadsheet clipboard actually produces, but it has consequences worth knowing before you blame the output:
- Commas inside a value split it. A line
Smith, John, 42becomes three cells, not two. If your data contains commas — names, addresses, numbers written with thousands separators — paste it as tab-separated instead, which is what a spreadsheet copy already gives you. - Columns beyond the header are dropped. The table is built to the width of the header row, so a data row with more cells than the header loses the extras rather than growing a column with no name.
- Short rows are padded, not rejected. A row with fewer cells than the header gets empty cells, so a ragged paste still produces a valid table.
- Blank lines are skipped, which is what you want when a spreadsheet copy leaves trailing newlines, and not what you want if a blank line was meant to be an empty row.
- Line breaks inside a cell become spaces. Markdown has no way to put a newline inside a table cell without raw HTML, so the value is flattened rather than emitted broken.
Values are not trimmed of internal spacing and nothing is converted to numbers, so a cell that says
007 stays 007. That matters for postcodes, phone numbers and identifiers
where a leading zero is part of the value.
Where the table will not render
Pipe tables are a GitHub Flavored Markdown extension. CommonMark alone does not define them, so a strict renderer shows the pipes as literal text. Most places people paste — GitHub, GitLab, Reddit with the right renderer, Notion, Obsidian, Jekyll and Hugo with the GFM plugin — handle them, but a bare CommonMark parser will not. If the destination is a documentation generator, check whether it enables GFM tables before choosing this format over an HTML table.
Cells are separated by pipes and the row boundaries are newlines, which means a table cannot contain a blank line partway through: a blank line ends the table, and everything after it becomes ordinary paragraphs. Keep the header, separator and every data row contiguous.
When a table is the wrong choice
A Markdown table is a two-dimensional grid with no row spans, no column spans, no multi-line cells and no captions. That is fine for a comparison of a few attributes across a few items, and wrong for anything wider than about six columns — a table that needs horizontal scrolling in the source is unreadable in the rendered page and unmaintainable in the diff. For wider data, a list of definition entries, a nested bulleted list, or a link to the CSV is usually clearer.
It is also the wrong choice when the content will be edited often. Column widths in the source no longer line up the moment somebody adds a longer value, and the diff of a hand-edited Markdown table is noisy. If the data changes regularly, keep the data in a CSV or JSON file and generate the table when the page is built.
Privacy
Spreadsheet data is frequently internal — figures, names, prices. This tool builds the table in your browser and never uploads what you paste, so a private grid can be turned into Markdown without leaving your machine.
Sources
The syntax follows the GitHub Flavored Markdown specification's table extension, which defines the
delimiter row as the mechanism for alignment and requires a header row. The escaping rule — a literal
| written as \| — comes from the same document.
Frequently asked questions
What does this generate?
A Markdown table — the pipe-and-dash syntax used by GitHub, GitLab, README files and most Markdown editors. Paste rows from a spreadsheet or type them, choose how each column aligns, and copy the finished table.
How do I paste from a spreadsheet?
Copy the cells in Excel, Google Sheets or any spreadsheet and paste them into the input. Tabs between cells and the line breaks between rows are detected automatically, so the grid comes in already split. Comma- and pipe-separated text work too.
What does column alignment do?
In Markdown the alignment is set by the separator row: :--- is left, :---: is centred and ---: is right. Many renderers also align the actual cells, so numbers read as a column of digits rather than ragged text.
How is a pipe character handled in a cell?
A literal | inside a cell would end the column, so it is escaped as \|. Everything else — spaces, commas, punctuation — is left as it is, and a cell that is empty becomes a blank cell rather than breaking the row.
Is my data uploaded?
No. The table is built in your browser from what you type or paste; nothing is sent anywhere, which matters when the rows come from a private spreadsheet.
Can I build the table visually instead?
The JSON to Table tool turns structured data into a table (and can output Markdown), and the HTML to Markdown tool converts an existing HTML table. This page is for text and spreadsheet grids.
Go deeper
Longer explanations of the problems this tool solves:
Sources
- GitHub Flavored Markdown Spec — tables.
Everything runs in your browser — nothing you type is uploaded.