Data & spreadsheet tools

Markdown table generator

Edit a grid or paste cells from a spreadsheet, choose how each column is aligned, and copy tidy Markdown that renders on GitHub, GitLab, Notion and most wikis — with the columns lined up in the source too.

Paste from Excel, Google Sheets, CSV or an existing Markdown table
Preview

Runs entirely in your browser. Nothing you enter here is uploaded.

How to make a Markdown table

  1. Type into the grid. The first row is the header. Use + Row and + Column to grow the table, and − Row or − Column to remove the last one.
  2. Or open Paste from…, paste cells copied from Excel or Google Sheets (they arrive as tab-separated text), a CSV snippet, or a Markdown table you want to reformat, and press Import.
  3. Choose an alignment for each column in the row of menus above the grid. Numbers usually read best right-aligned.
  4. Copy the Markdown. The preview shows how it will render.

The Markdown table format

Tables are not part of original Markdown; the syntax used almost everywhere today comes from the GitHub Flavored Markdown specification. A table is a header row, a delimiter row and any number of body rows. Cells are separated by vertical bars, and the delimiter row is made of hyphens, with colons marking alignment: :--- left, :---: centre, ---: right.

| Item    | Qty | Price |
| :------ | --: | ----: |
| Apples  |   3 |  4.50 |
| Bananas |  12 |  0.80 |

Escaping

A vertical bar inside a cell would end the cell, so it is written as \|. Markdown tables cannot contain real line breaks either; a line break inside a cell is converted to <br>, which GitHub and most renderers display as a new line within the cell.

Aligned source

Renderers do not need the columns to line up, but people reading the raw file do — in a pull request diff or a README opened in an editor. The generator pads every cell with spaces to the width of its column. Chinese, Japanese and Korean characters and full-width punctuation occupy two columns in a monospaced font, so they are counted as width 2; otherwise a table containing Chinese text would look ragged in the source even though it renders fine.

Pasting

Spreadsheets put tab characters between cells when you copy, so any pasted text containing tabs is split on them. Text that already looks like a Markdown table — every line starting and ending with a bar — is read as one, which is a quick way to realign or re-align an existing table. Anything else is read as CSV, with quoted fields handled properly.

Examples

Two columns, the first left-aligned and the second right-aligned:

| Name  | Qty |
| :---- | --: |
| Apple |   3 |

A cell containing a pipe, with the second column centred:

| a\|b |  c  |
| ---- | :-: |

Chinese text counted as double width, so the source stays aligned:

| 水果 | n   |
| ---- | --- |
| 苹果 | 1   |

Every column is at least three characters wide, the minimum the delimiter row needs, and short rows are filled with empty cells.

Limits

  • No merged cells, no multi-line blocks. Markdown tables are strictly one line per row. Complex tables need HTML.
  • Inline formatting passes through. Text such as bold or code inside a cell is left as typed and rendered by your Markdown viewer; the preview here shows it as plain text.
  • Width counting is approximate for emoji and rare scripts, whose display width varies between fonts. Rendering is unaffected.
  • Not every platform supports tables. Reddit, GitHub, GitLab, Notion, Obsidian and most static site generators do; plain CommonMark without extensions does not.

Frequently asked questions

How do I copy a table from Excel into Markdown?

Select the cells in Excel, copy, open Paste from… here, paste and press Import. The tab-separated text Excel produces is split into cells automatically.

How do I align a column to the right?

Choose Right in the menu above that column. The delimiter row gets a colon on the right, like ---:.

How do I put a | character in a cell?

Just type it. The generator escapes it as \| so it does not end the cell.

Can a cell contain a line break?

Markdown tables do not allow real line breaks, so they are converted to <br>, which most renderers show as a new line inside the cell.

Is anything uploaded?

No. The table is built in your browser.

Sources and further reading

Guides that use this tool

↵ to open · Esc to close