Free tool

Markdown table generator

Type into the grid or paste cells straight from Excel, Google Sheets or a CSV file, pick the alignment of each column, and copy a GitHub-flavored Markdown table whose columns line up in the source.

Free · no sign-up · runs in your browser, nothing is uploaded

3 rows × 4 columns
Table editor
H
1
2
3
Import rows
Drop a .csv, .tsv or .md file here, or click to open one
| Tool     | Category   | Free tier | Stars |
| :------- | ---------- | :-------: | ----: |
| Supabase | Database   |    Yes    |   78k |
| Vercel   | Hosting    |    Yes    |   13k |
| Sentry   | Monitoring |    Yes    |   40k |

The preview renders GitHub-flavored Markdown, so **bold**, `code` and links in cells show as they will on GitHub. For a whole document, use the Markdown to HTML converter.

Markdown table syntax

A Markdown table is a header row, a delimiter row and any number of body rows. Pipes separate the cells; the outer pipes are optional but make the table easier to read.

| Plan | Price | Seats |
| :--- | ----: | :---: |
| Free |    $0 |   1   |
| Team |   $12 |  10   |
Delimiter cellAlignmentHTML GitHub produces
---not set (renderer default)<th>
:---left<th align="left">
:---:center<th align="center">
---:right<th align="right">

The spec needs only one hyphen per delimiter cell, while GitHub’s docs ask for at least three. The generator always writes three or more, so the table works in both. Padding the cells with spaces changes nothing in the rendered table; it only makes the source readable in a code review.

Rules that break tables

  • Header and delimiter must have the same number of cells. If they differ, GitHub does not see a table at all and shows the raw pipes. Body rows are more forgiving: missing cells are left empty and extra cells are dropped.
  • A pipe inside a cell must be escaped as \|, even inside a code span such as `a \| b`. An unescaped pipe starts a new cell.
  • Cells hold inline content only. Bold, links, images and code work. Lists, code blocks and several paragraphs do not. For a line break, use <br>.
  • No merged cells. There is no colspan or rowspan. Use an HTML table inside the Markdown file when you need them.
  • Give the table its own block. A blank line before and after the table is accepted by every renderer and avoids it being read as part of a paragraph.

Generate a Markdown table in code

Python with pandas. to_markdown needs the tabulate package installed:

import pandas as pd

df = pd.read_csv("data.csv")
print(df.to_markdown(index=False))

Command line with pandoc, which reads CSV and writes GitHub-flavored Markdown:

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

JavaScript, no library. Escape pipes and line breaks, then join:

const cell = v => String(v).replace(/\|/g, '\\|').replace(/\r?\n/g, '<br>');
function toMarkdownTable([head, ...rows]) {
  const line = r => `| ${r.map(cell).join(' | ')} |`;
  return [line(head), line(head.map(() => '---')), ...rows.map(line)].join('\n');
}

toMarkdownTable([['Name', 'Role'], ['Ada', 'Engineer']]);

Getting data in and out

Copying a range in Excel or Google Sheets puts tab-separated text on the clipboard, with quotes around cells that contain line breaks. The import box reads that, comma or semicolon CSV (as defined in RFC 4180), pipe-separated text and existing Markdown tables, and tells you which format it found. If rows have different lengths, it pads them and says how many.

Besides Markdown, the output can be an HTML table or CSV. To work with the data itself, try the CSV viewer or CSV to JSON converter. To render the finished table, paste it into the Markdown to HTML converter. Writing docs often? Browse documentation tools on DevHunt.

FAQ

How do I make a table in Markdown?+

Write a header row with cells split by pipes, then a delimiter row of hyphens, then one line per row: | Name | Role |, then | --- | --- |, then | Ada | Engineer |. The editor above writes this for you, including the padding that makes the source line up.

How do I convert an Excel or Google Sheets range to a Markdown table?+

Select the cells, copy them, click any cell in the editor above and paste. Spreadsheets copy cells as tab-separated text, so the rows and columns land in the grid, which grows to fit. You can also paste into the import box or drop a .csv file.

How do I align columns in a Markdown table?+

Put colons in the delimiter row: :--- is left, :---: is centered and ---: is right. No colon leaves the alignment to the renderer, which is usually left. In the editor, use the three buttons above each column.

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

Escape the pipe as \| (also inside `code`). A GFM cell must stay on one line, so use <br> for a line break; GitHub renders it. The generator escapes pipes and converts line breaks for you.

Can Markdown tables merge cells or have no header?+

No. GitHub-flavored Markdown has no colspan or rowspan and always needs a header row. For merged cells, write an HTML <table> in the Markdown file instead. If your data has no header, tick "First row is data" when importing and the tool adds Column 1, Column 2 and so on.

Where do Markdown tables work?+

Anywhere that renders GitHub-flavored Markdown: GitHub READMEs, issues and wikis, GitLab, and editors such as Obsidian and VS Code’s preview. The original 2004 Markdown had no tables, so strict CommonMark renderers without the tables extension show the pipes as plain text.

Can I edit an existing Markdown table?+

Yes. Paste the table into the import box and press Load into editor. The tool reads the cells and the alignment, so you can add a column or sort the rows and copy the result back.

Sources: GitHub Flavored Markdown spec: tables · GitHub Docs: organizing information with tables · RFC 4180 (CSV) · pandas DataFrame.to_markdown · Pandoc user guide. Checked October 2026.