Markdown table generator
Edit a table in a grid, or paste it from a spreadsheet, CSV or TSV, and copy it as a GitHub-flavored Markdown table with neat columns.
Runs in your browser; nothing you type leaves your device
Tables up to a few thousand cells. Markdown tables hold one line of text per cell, so line breaks inside a cell are written as
, and pipe characters are escaped. The first row is always the header row, as GitHub requires.
How to make a Markdown table
- Type into the grid, or paste cells copied from a spreadsheet straight into it. You can also paste CSV, TSV or an existing Markdown table into the box and fill the grid from it.
- Add or remove rows and columns, and choose left, centre or right alignment for each column.
- Copy the Markdown and paste it into your README, issue, pull request or document.
How a Markdown table is written
A GitHub-flavored Markdown table is plain text: a header row, a row of dashes that sets the alignment, and one line per data row, with cells separated by pipe characters. It is the format GitHub renders in READMEs, issues and pull requests, and many other tools, including documentation sites and note apps, understand it too.
The grid holds the cells; the first row is the header. Each column has an alignment. Left is written :---, centre :---:, right ---:, and none is plain dashes. Cell text is escaped where needed: a pipe becomes \|, and a line break becomes the HTML tag <br>. The tool then lines up the columns with spaces so the source reads like a table, using the width of each character rather than its byte count so accented letters line up.
Pasting from a spreadsheet is the quickest way to start. Spreadsheets put copied cells on the clipboard as tab-separated text, with one line per row, and the grid reads that directly. CSV and TSV files work the same way through the paste box, with quoted fields and quoted line breaks handled. If you paste an existing Markdown table, the cells and alignments are read back into the grid so you can change them.
Tips
- Have JSON instead of a spreadsheet? Convert it first with JSON to CSV, then paste the result here.
- See how the table will look with Markdown to HTML.
- Going the other way, from a web page back to Markdown, use HTML to Markdown.
Questions
How do I turn a spreadsheet into a Markdown table?
Select the cells in Excel, Google Sheets or Numbers, copy them and paste into any cell of the grid. Spreadsheet cells arrive as tab-separated text, and the grid fills in from the cell you pasted into. You can also paste CSV or TSV into the box above the grid and choose Fill the grid from this text.
How do column alignments work?
The row of dashes under the header sets the alignment: :--- is left, :---: is centre, ---: is right, and --- is the default. Pick an alignment for each column above its header cell.
What happens to a pipe or a line break in a cell?
A pipe | would end the cell, so it is written as \|. Markdown tables cannot hold real line breaks, so a line break in a cell is written as
, which GitHub shows as a new line.
Why are the columns padded with spaces?
Padding lines the columns up so the table is easy to read as plain text. It makes no difference to how it renders. Untick Line up the columns for the shortest form.
Can I edit an existing Markdown table?
Yes. Paste it into the box and choose Fill the grid from this text. The tool reads the cells and the alignments and puts them in the grid.
Is my table uploaded?
No. The table is built in your browser and nothing leaves your device.