MarkdownPDF

Markdown Table Generator

Type into the grid, or paste cells from Excel, Google Sheets or a CSV file, and copy a clean GitHub-flavored Markdown table.

Import from CSV, a spreadsheet or an existing Markdown table
This replaces the table above.

Or drop a .csv, .tsv or .md file, or browse

2 rows × 3 columns

Markdown tables without counting pipes

Markdown tables are simple once written and tedious to write: every row needs the same number of pipes, the separator row needs a dash per column, and one stray | in a cell breaks the row. The grid takes care of all of it, and escapes what needs escaping.

| Item   | Qty |
| :----- | --: |
| Apples |   3 |

Tables made here work on GitHub, GitLab, Obsidian, Notion, Docusaurus and anything else that follows GitHub-flavored Markdown. To see one rendered, paste it into Markdown to HTML; to put it in a document, use Markdown to PDF or Markdown to Word. Tables trapped in a PDF? PDF to Markdown extracts them — see extracting tables from PDFs.

How to make a table in Markdown

Markdown table syntax comes from GitHub-flavored Markdown (GFM). A table is three kinds of line: a header row, a separator row, and the data rows. Cells are separated by pipes (|), and the separator row needs at least three dashes for each column.

| Format   | Opens in        | Editable |
| :------- | :-------------: | -------: |
| Markdown | any text editor |      yes |
| PDF      | a PDF reader    |       no |
  • Alignment is set in the separator row: :--- left, :---: centred, ---: right.
  • Column widths in the source do not matter. The dashes and spaces only need to be there, not to line up — aligning them is purely for readability.
  • Pipes inside a cell must be escaped as \|, or they start a new cell.
  • Line breaks inside a cell are not allowed in the source; use <br> where the renderer accepts HTML.
  • Inline formatting works inside cells: **bold**, `code` and links. Lists, headings and multiple paragraphs do not.

Writing that by hand is fine for three rows. For anything longer, or for data that already lives in a spreadsheet, the generator above writes the pipes, the separator row and the escaping for you — and converts a Markdown table back to CSV when you need the data out again.

Where Markdown tables work

Pipe tables are part of GFM, so they render on GitHub (README files, issues, pull requests and wikis), GitLab, Bitbucket, Obsidian, Joplin, Typora, and documentation generators such as Docusaurus and MkDocs. In a Jupyter notebook, paste the table into a Markdown cell and run it — JupyterLab and Jupyter Notebook render it as a table. Tables are not part of the original Markdown or of strict CommonMark, so a renderer that only follows those shows the raw pipes; chat apps in particular often support bold and links but not tables. When in doubt, preview the table with Markdown to HTML, or see the rest of the syntax in the Markdown cheat sheet.

Frequently asked questions

Still stuck? Ask us.

How do I convert an Excel or Google Sheets range?

Select the cells in the spreadsheet, copy, then either paste into the import box and press Import, or click a cell in the grid and paste: the block fills the grid from that cell, adding rows and columns as needed. The first row becomes the header.

Which CSV formats are supported?

Comma, semicolon (what Excel writes in many European locales) and tab separators, detected automatically. Quoted fields may contain separators, quotes (doubled, as the CSV standard says) and line breaks.

How is column alignment written?

With colons in the separator row: :--- for left, :---: for centre, ---: for right. Choose it per column from the menu above each column. Without colons, renderers use their default, usually left.

What happens to | characters and line breaks inside cells?

A pipe would end the cell, so it is written as \|. A Markdown table row must stay on one line, so line breaks become <br>, which GitHub, GitLab and most renderers display as a line break.

Can I edit an existing Markdown table?

Yes: paste it into the import box. The alignment of each column is read from its separator row, and escaped pipes and <br> are turned back into what they stand for.

How do I make a table in Markdown by hand?

Write a header row with cells separated by pipes, then a separator row with at least three dashes per column, then one line per data row: | Name | Qty |, | --- | --- |, | Apples | 3 |. The pipes at the start and end of each line are optional but make the source easier to read. Every row must stay on one line.

Can I convert a Markdown table back to CSV or Excel?

Yes. Paste the Markdown table into the import box, then use Download .csv. The CSV opens in Excel, Google Sheets or Numbers, with escaped pipes and <br> turned back into the characters they stand for.

Why align the columns in the source?

It changes nothing in the rendered table; it makes the raw Markdown readable in an editor and in code review. Turn it off for the most compact output.

Limitations

Guides