Skip to content
Case Converter Online
en

Markdown Table Generator

Type into a grid or paste cells from Excel or Google Sheets, and get a Markdown table with the columns lined up. Set the alignment of each column with one click.

The first row is the header. You can paste a block of cells straight into any cell. Press Enter to move down.

Why use a Markdown table generator

Markdown tables are plain text. Each row is a line, cells are separated by pipes and a divider row of dashes sits under the header. That is easy to read but slow to type, and keeping the columns lined up by hand is tedious. One longer value means you have to pad every other row again.

This tool gives you a grid to type in, like a small spreadsheet, and writes the Markdown for you. It also reads data you already have: cells copied from Excel or Google Sheets, CSV text, or an existing Markdown table.

How to use the grid

  • Type in any cell. The first row is the header and is shown in bold.
  • Add row and Add column grow the table. The small x buttons next to each row and above each column remove it.
  • Press Enter to move down a row. At the last row, Enter adds a new one.
  • Alignment: the select above each column sets Default, Left, Center or Right.
  • Paste a block of cells into any cell to fill the grid from that point.
  • Paste data opens a box for spreadsheet cells, CSV or a Markdown table. Press Load into the grid to replace the grid with it.
  • Swap rows and columns turns the table on its side.
  • Sample loads an example and Clear starts again with an empty 3 by 3 grid.

The Markdown appears under the grid. Line up columns pads every cell so the table reads well as plain text. Turn it off for the shortest output. Copy puts it on your clipboard and Download saves a .md file.

Example

A small pricing table with the first column aligned left, prices aligned right and the user count centred:

| Plan     | Price |   Users   |
| :------- | ----: | :-------: |
| Free     |    $0 |     1     |
| Team     |   $12 |    10     |
| Business |   $30 | Unlimited |

The colons in the divider row set the alignment: a colon on the left means left, on the right means right, on both sides means centre. With Line up columns turned off, the same table is written without padding:

| Plan | Price | Users |
| :-- | --: | :-: |
| Free | $0 | 1 |
| Team | $12 | 10 |
| Business | $30 | Unlimited |

Both versions render the same. The padded one is easier to read and edit in a text file. The compact one is shorter and gives smaller diffs when a single value changes.

Special characters in cells

A pipe in a cell would end the cell early, so the generator escapes it. A line break inside a cell, which can come from a spreadsheet paste, becomes <br>:

| Command        | Meaning     |
| -------------- | ----------- |
| a \| b         | pipe output |
| line1<br>line2 | two lines   |

Other Markdown inside a cell, such as **bold**, a link or inline code, is kept and renders as normal.

Padding counts Chinese, Japanese and Korean characters as two columns wide, because that is how they show in most monospace fonts. That keeps the pipes lined up in editors that use such fonts.

Where Markdown tables work

GitHub, GitLab, Bitbucket, Obsidian, Reddit and most static site generators support this table syntax. It comes from GitHub Flavored Markdown. The original Markdown had no tables, so a very old renderer may show the raw pipes.

Tips

  • Keep tables narrow. Long sentences belong in paragraphs. A table with 3 to 6 short columns is easiest to read on a phone.
  • Start from a spreadsheet when the data already lives in one. Copy the range, paste it into the first cell and adjust the alignment.
  • To tidy a table inside a longer document, paste the whole document into the Markdown formatter. It pads tables the same way.
  • For data that should end up as JSON rather than a table, use the CSV to JSON converter.
  • To turn an HTML table from a web page into Markdown, use the HTML to Markdown converter.

Other ways to make Markdown tables

  • VS Code: extensions such as Markdown All in One format tables in place when you format the document.
  • Pandoc can turn a CSV or spreadsheet export into a Markdown table on the command line.
  • Google Sheets: there is no built-in Markdown export, but copying the cells and pasting them here takes a few seconds.

Everything happens in your browser. The data you paste is not sent anywhere.

Markdown Table Generator: questions and answers

How do I copy a table from Excel or Google Sheets?

Select the cells in your spreadsheet and copy them. Then click any cell in the grid and paste. The cells fill the grid from that point, just like pasting into another spreadsheet. You can also press Paste data, paste into the box and press Load into the grid.

Can I edit a Markdown table I already have?

Yes. Press Paste data, paste the existing Markdown table and press Load into the grid. The cells and the column alignment are read back, so you can add rows or columns and copy the new version.

How do I put a pipe character or a line break in a cell?

Type the pipe as normal. The generator writes it as \| so it does not end the cell. A line break inside pasted cell text is written as <br>, which GitHub and most renderers show as a new line inside the cell.

Is there a size limit?

The grid holds up to 500 rows and 30 columns. That is far more than most Markdown tables need. Very wide tables are hard to read in plain text anyway, so consider splitting them.

More code and data tools

See all tools