Markdown Table Generator

Build GitHub Markdown tables in a grid, or convert CSV, Excel and Google Sheets data. Sets column alignment, escapes pipes and lines up columns for readable source.

The interactive tool loads here when JavaScript runs.

About this tool

What is the Markdown Table Generator?

Writing a Markdown table by hand means counting pipes and dashes. This generator gives you a grid instead: type into the cells, add or remove rows and columns, set each column to left, center or right alignment, and copy the GitHub Flavored Markdown underneath, with a live preview of how it renders.

Most tables already exist somewhere else, so you can also import. Paste cells copied from Excel, Google Sheets or Numbers (they arrive as tab-separated text), paste CSV, open a CSV, TSV, XLSX, XLS or ODS file, or paste an existing Markdown table to edit and re-align it. Quoted CSV fields with commas or line breaks are handled by Papa Parse, and spreadsheets are read with SheetJS, both inside your browser.

The output escapes pipe characters inside cells as \| and turns line breaks into <br>, the two things that most often break a table on GitHub. With padding on, every column lines up in the raw Markdown too, counting Chinese, Japanese and Korean characters as double width so the source stays readable in a code editor.

  • Grid editor with per-column alignment
  • Import from spreadsheet paste, CSV, TSV, Markdown, XLSX, XLS and ODS
  • Pipes escaped and line breaks turned into <br>
  • Padded output that lines up, CJK width aware
  • Live rendered preview
  • Copy as Markdown or CSV, download as .md
  • Files are read in the browser and never uploaded
Read the guide: Markdown Tables: Syntax, Alignment, Escaping and Limits

How to use the Markdown Table Generator

  1. Start from the sample grid, or press New empty table.
  2. Type into the cells. The first row is the header. Use + Row and + Column to grow the table and the trash and minus buttons to remove columns and rows.
  3. Set each column's alignment with the icons above it.
  4. To import, paste spreadsheet cells, CSV or a Markdown table into the Import box and press Import pasted text, or open a file.
  5. Choose padding, outer pipes and bold headers, then copy or download the Markdown. Copy as CSV exports the grid back to a spreadsheet.

Worked examples

CSV to Markdown

Input

Plan,Price,Users
Free,$0,1
Team,$12,10

Output

| Plan | Price | Users |
| ---- | ----- | ----- |
| Free | $0    | 1     |
| Team | $12   | 10    |

The first CSV row becomes the header and the columns are padded so the raw Markdown lines up.

Right-aligned numbers

Input

Same data with all columns set to right

Output

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

The colon on the right of each delimiter tells the renderer to right-align, which makes prices and counts easier to compare.

A pipe inside a cell

Input

Cell text: Fuzzy finder | pipes are escaped

Output

| fzf | Go | MIT | Fuzzy finder \| pipes are escaped |

Unescaped, the pipe would split the cell in two and shift every column after it.

Background and insight

Tables are not part of the original Markdown or of CommonMark. They come from the tables extension in the GitHub Flavored Markdown specification, which GitHub, GitLab, Docusaurus, Obsidian and most static site generators (through remark-gfm or similar) follow. A table is a header row, a delimiter row made of hyphens, and any number of body rows, with cells separated by pipes. Leading and trailing pipes are optional, and the columns do not have to line up for the table to render.

Alignment lives in the delimiter row: :--- for left, :---: for center, ---: for right, and plain --- to leave it to the renderer, which usually means left. The spec also explains the two common gotchas. A pipe inside a cell must be escaped as \|, even inside an inline code span, or it starts a new cell. And a cell cannot contain a line break, because each line is a row; GitHub and many other renderers accept the HTML tag <br> instead.

GFM tables have no column spans, row spans or captions, and every table needs a header row. If you need those, write an HTML table, which GitHub also renders. A body row with fewer cells than the header gets empty cells, and extra cells are ignored, so the generator pads ragged imports to the header's width.

Common use cases

  • README files

    Add feature comparisons, option lists, supported versions or benchmark results to a project README.

  • Docs and wikis

    Convert a spreadsheet of settings or API parameters into a table for GitHub wikis, GitLab pages or Docusaurus.

  • Pull requests and issues

    Paste before-and-after measurements from a sheet into a PR description as a readable table.

  • Notes apps

    Create tables for Obsidian, Joplin or other Markdown note-taking apps without fighting the syntax.

Tips and limitations

  • Copying cells from Excel or Google Sheets puts tab-separated text on the clipboard, which imports more reliably than saving a CSV, especially for numbers with thousands separators.
  • Spreadsheet imports use the displayed (formatted) values from the first sheet, so dates and currencies look as they do in the sheet.
  • Keep padding on for tables people will edit in source; turn it off for very wide tables to keep the file small.
  • Inline Markdown such as **bold**, `code` and [links](https://example.com) works inside cells. Block content such as lists or headings does not.
  • Very wide tables scroll sideways on GitHub. Consider splitting them or moving long text into notes below the table.

Frequently asked questions

How do I align a column in a Markdown table?

Put colons in the delimiter row under the header: :--- aligns left, :---: centers and ---: aligns right. In this tool, click the alignment icons above each column and the delimiter row is written for you.

How do I put a pipe character inside a table cell?

Escape it as \|. GitHub Flavored Markdown requires this even inside backtick code spans. The generator escapes pipes automatically.

Can a Markdown table cell contain a line break?

Not as a real newline, because each line is a table row. Use <br> instead, which GitHub, GitLab and most renderers support. Line breaks in imported CSV cells are converted to <br> for you.

Can I merge cells or span columns?

No. GitHub Flavored Markdown tables have no colspan or rowspan. Use an HTML table when you need merged cells; GitHub renders basic HTML tables in Markdown files.

How do I convert an Excel sheet to a Markdown table?

Either select the cells in Excel, copy, and paste them into the Import box, or open the .xlsx file with Open file. The first sheet is imported using its displayed values.

Do the columns need to line up for the table to work?

No, renderers ignore the extra spaces. Lining them up only makes the raw Markdown easier to read and review, which is why padding is on by default.

Is there an in-depth guide to the Markdown Table Generator?

Yes. “Markdown Tables: Syntax, Alignment, Escaping and Limits” covers the background, how it works, common pitfalls and worked examples. Read the full guide.

People also search for

  • csv to markdown table converter
  • paste excel into markdown table
  • google sheets to github markdown table
  • markdown table column alignment syntax
  • escape pipe character in markdown table
  • line break inside markdown table cell
  • format existing markdown table online
  • readme comparison table markdown