Tables in Markdown
Many Markdown flavours, including GitHub Flavored Markdown, GitLab, Obsidian and most documentation generators, support tables written with pipe characters. A header row is followed by a divider row of hyphens, then the data rows, each cell separated by a pipe. Writing this by hand is tedious, especially keeping the pipes lined up, and a single missing pipe can break the table. This generator builds the table from data you already have in a spreadsheet or CSV file.
How to use it
- Select the cells in Excel, Google Sheets or Numbers and copy them. The clipboard holds tab-separated text, which is the default setting.
- Paste into the box. For CSV files, choose Comma as the separator. Fields in double quotes may contain commas.
- Pick an alignment for the columns. This adds the colons in the divider row (:--- left, :---: centre, ---: right).
- Copy the result into your README, wiki page or note.
The first row is always the header, since Markdown tables need one. If your data has no header, add a row of column names first. Rows shorter than the widest row are padded with empty cells so that the table stays valid.
Pretty or compact
With "Pad columns" ticked, every cell is padded with spaces so the pipes line up in plain text, which makes the source easy to read and edit. Unticking it produces the shortest valid table. Both render identically on a web page. Pipe characters inside cells are escaped with a backslash so they do not split the cell.
Limits of Markdown tables
- Cells hold inline content only: text, bold, links and code. Line breaks and block elements such as lists are not supported inside a cell in most flavours.
- The original Markdown specification has no tables. Check that your platform supports the GFM table syntax.
- Very wide tables scroll sideways on mobile devices, so consider keeping columns to a minimum.
All conversion happens in your browser and no data is uploaded.