Skip to main content

Free Tool

Markdown Table Generator

Type into the grid, or paste cells from Excel, Google Sheets, or a CSV file. The pipe table updates as you go, with pipes escaped and columns lined up. Nothing is uploaded.

Column alignment

Click a button to set the separator for that column

Tip: copy cells from Excel or Google Sheets, or the rows of a CSV file, and paste into any cell to replace the grid.

Markdown output

| Feature    | Status  | Score |
| :--------- | :------ | :---- |
| Dark mode  | Shipped | 95    |
| SSO        | Planned | —     |
| Mobile app | Beta    | 78    |
4 rows · 3 columns

Markdown table syntax

A Markdown table is a header row, a row of dashes, and one line per data row, with pipes between the cells. Colons in the dashed row set each column's alignment. The source does not have to line up; the generator pads it only so it stays readable.

| Feature | Status  | Score |
| :------ | :-----: | ----: |
| Tables  | Shipped |    95 |
| Export  | Beta    |    78 |
Feature Status Score
Tables Shipped 95
Export Beta 78
  • The header row is required. GitHub Flavored Markdown only recognizes a table that starts with a header row and the dashed row; without them the pipes print as text. With the header switched off, the generator writes an empty header row.
  • The header and dashed rows need the same number of cells. Data rows can be short (missing cells come out empty) or long (extra cells are dropped).
  • A blank line ends the table. So does any line that starts another block, such as a heading or a list.

The Markdown tables guide covers the rules in full, with platform differences.

Convert Excel, Google Sheets, or CSV to a Markdown table

  1. Select the cells in your spreadsheet, or the rows of a CSV file opened in a text editor.
  2. Copy them (Ctrl+C or Cmd+C).
  3. Click any cell in the grid above and paste. The grid is replaced by your data.
  4. Set the alignment for each column, then copy the table or download it as a .md file.

Spreadsheets copy cells as tab-separated text and wrap any cell that holds a tab, a quote, or a line break in double quotes. The generator reads that quoting, so a multi-line cell stays one cell (with its line breaks turned into <br>) instead of spilling into new rows. CSV works the same way, with commas instead of tabs. For a file you convert often, Pandoc does it from the command line:

pandoc data.csv -t gfm -o table.md

Line breaks, lists, and pipes inside a cell

A table cell holds one line of inline Markdown. Block elements such as a real list or a code block cannot go in a cell, and a newline ends the row. The workarounds are HTML, which GitHub and most renderers allow inside cells, and an escaped pipe:

| Command   | Notes                        |
| --------- | ---------------------------- |
| `a \| b`   | Escaped pipe, even in code   |
| Two lines | First line<br>Second line    |
| A list    | <ul><li>One</li><li>Two</li></ul> |
Command Notes
a | b Escaped pipe, even in code
Two lines First line
Second line
A list
  • One
  • Two

The pipe has to be escaped even inside backticks, which is the one place where a backslash usually does nothing. A Discord message, or a Slack message you type, cannot show a table at all; there, line the columns up with spaces inside a code block.

Need the table as a document? Paste it into the Markdown to PDF converter or the Markdown to HTML converter.

Frequently asked questions

How do I create a Markdown table?
Write a header row with cells separated by pipes, put a row of dashes under it, then add one line per row: | Name | Role |, then | --- | --- |, then | Ada | Admin |. The generator above writes and aligns those pipes for you as you edit the grid.
How do I convert Excel or Google Sheets to a Markdown table?
Select the cells in the spreadsheet, copy them, click any cell in the generator's grid and paste. The clipboard holds the cells as tab-separated text, which the generator turns into rows and columns, including cells that contain line breaks or quotes.
How do I convert a CSV file to a Markdown table?
Open the CSV in a text editor, copy the rows, and paste them into any cell of the grid. Quoted fields such as "Smith, J" stay in one cell. From the command line, pandoc data.csv -t gfm prints the same thing as a pipe table.
How do I align columns in a Markdown table?
Put colons in the dashed row under the header: :--- aligns a column left, ---: aligns it right, and :---: centers it. The alignment buttons under the grid set this per column.
Can a Markdown table have no header row?
No. GitHub Flavored Markdown only recognizes a table that has a header row followed by the dashed delimiter row; without them the pipes render as plain text. If you untick First row is header, the generator adds an empty header row so the output is still a valid table.
How do I add a line break inside a Markdown table cell?
Use <br> where the break should go. A table row has to stay on one line in the source, so pressing Enter would end the row. The generator converts line breaks in pasted cells to <br> automatically.
How do I put a pipe character inside a table cell?
Escape it as \|. That applies inside inline code too, where most other escapes do nothing. The generator escapes every pipe you type into a cell.
Where do Markdown tables work?
GitHub, GitLab, Obsidian, VS Code's preview, Reddit, and most static site generators render pipe tables, and Notion converts a pasted one into a native table. Discord has no table syntax at all. Slack renders one only inside an app's Block Kit markdown block, not in a message you type.
Is my table data uploaded?
No. The generator runs entirely in your browser. Nothing you type or paste is sent to a server, so private data is safe to paste.