Markdown Table Generator
Edit a Markdown table in a grid or paste one from Excel, Google Sheets, CSV, JSON or HTML. Pipes and line breaks are escaped, and CJK columns line up.
- Runs in your browser
- Your data never leaves your browser
- Free · No Sign-Up
Scan with WeChat to share this tool
Examples, details and FAQ Worked examples, how it compares with other tools, and answers to common questions.
Example: a range copied from Excel
A sales sheet with an empty top-left cell, a note that spans two lines in one cell, and an empty last cell. Pasted into the first header cell, with column Q1 set to Right:
| | Q1 | Q2 |
| ----- | ----: | -------------------- |
| North | 1,200 | Delayed:<br>supplier |
| South | 980 | |
The empty first cell keeps its column, so Q1 stays above 1,200. The line break inside the cell becomes <br>, because a real line break would end the row (GFM spec, section 4.10).
Example: text that looks like Markdown
Cells are Markdown by default, so **bold**, `code` and links work. Data from a spreadsheet often contains * and _ that are not meant as formatting. With Cell text: Markdown this CSV
pattern,matches
*.md,every Markdown file
_draft_,files named _draft_
a|b,a or b
| pattern | matches |
| ------- | ------------------- |
| *.md | every Markdown file |
| _draft_ | files named _draft_ |
| a\|b | a or b |
renders draft in italics, and the note under the output says how many cells change when rendered. Cell text: Plain text escapes them:
| pattern | matches |
| --------- | --------------------- |
| \*.md | every Markdown file |
| \_draft\_ | files named \_draft\_ |
| a\|b | a or b |
Underscores inside a word (snake_case) are left alone, since they cannot start emphasis. © gets a backslash only when it would turn into ©.
Example: tidying an existing table
Import data → Markdown table reads a table the way GitHub does and writes it back aligned. Code spans keep their escaped pipe:
|Option|Default|Notes|
|-|:-:|-|
|`--depth`|1|Use `--depth 0` for \| full history|
|`--quiet`|off|
| Option | Default | Notes |
| --------- | :-----: | ----------------------------------- |
| `--depth` | 1 | Use `--depth 0` for \| full history |
| `--quiet` | off | |
The short last row gets an empty cell. A row with more cells than the header is kept as extra columns and reported, because GitHub would hide those cells.
Escaping and line breaks, checked on real renderers
The test script for this tool (source) renders the output with micromark and compares it with HTML recorded on 2026-10-02 from the GitHub and Gitee Markdown APIs, Zenn’s renderer (zenn-markdown-html 0.5.4) and Qiita’s (qiita_marker 0.23.9.0):
In a cell GitHub, Gitee, Qiita, Zenn micromark (remark, MDX, Astro)
a\|b a|b a|b
`a\|b` code a|b code a|b
`a|b` cell ends after `a cell ends after `a
x\\|y one cell: x|y two cells: x\ and y
line 1<br>line 2 line break line break when HTML is allowed
**注意:**ここ not bold not bold
The tool never writes \\|: a backslash followed by a pipe becomes \\\|, which all five read as \|. The last row is a CommonMark rule, not a table rule: ** next to full-width punctuation such as : does not open emphasis, so in CJK text put the bold markers around whole words or add a space.
Columns that line up with CJK text
Aligned columns pads every cell to the widest cell in its column, measured in display columns: Chinese, Japanese and Korean characters and emoji count as 2, combining marks as 0 (Unicode UAX #11, data from EastAsianWidth 18.0.0). The width rules are the same as string-width 8.1.0, which markdownlint uses for rule MD060; the tests run MD055, MD056, MD058 and MD060 on 200 random tables in both layouts.
| Office | Name | Staff |
| ----------- | --------- | ----: |
| Head office | 本社 | 120 |
| Busan | 부산 지점 | 8 |
Characters such as ○, ×, ① and → are ambiguous in UAX #11: one column in Western fonts, two in most Chinese, Japanese and Korean fonts. Turn on the ambiguous-width option if your editor shows them wide.
How it compares
Tested on 2026-10-02 with the same Excel-style data (empty top-left cell, a two-line cell, a|b, 5*3*2, 東京):
- tablesgenerator.com posts the Paste table data text to its server, drops the empty first cell (every header moves one column left) and splits the two-line cell into two rows.
- tableconvert.com (Excel source) also drops the empty first cell, so data rows have one cell more than the header, and leaves
a|bunescaped. - tabletomarkdown.com keeps the columns and escapes
|and*, but not_. - All three pad by character count, so the cell with
東京comes out two columns too wide in a monospace font.
Limits
- No merged cells: GFM has no colspan or rowspan. Merged cells from HTML are split; the text goes into the first cell.
- Cells hold inline Markdown only: no lists, block quotes or code blocks.
- Leading and trailing spaces in a cell are dropped (GFM trims them) and tabs become spaces.
- The grid shows the first 1,000 rows; the Markdown output has all rows.
- Import reads the first Markdown table in the text and the first
<table>in HTML. - When the import text cannot be read, nothing is imported and the output stays empty until it can: JSON with a syntax error gives the line and column (in Detect too, as long as the text starts like a JSON value, so
[{"a":1},gives “JSON error at line 1, column 10”), and a Markdown table whose delimiter row has a different number of cells than the header row is named with its line. A CSV field that opens a quote and never closes it is imported as typed, with a note that gives its line. - Open file and drop take one CSV, TSV, JSON, Markdown or HTML file of up to 10 MB, read as UTF-8. A file in another encoding is not opened: a CSV that Excel saved in GBK, Shift_JIS or EUC-KR with
name,cityon its first line stops at “byte 10 (counting from 0) is not valid UTF-8”. Save it as CSV UTF-8 in Excel and open it again.
Related: CSV to Markdown for a quick one-way conversion, HTML to Markdown for whole pages, and Markdown Preview to check the table in context.
FAQ
How do I make a line break inside a Markdown table cell?
GFM table cells hold one line, so a real line break ends the row. Press Shift+Enter in a cell and the tool writes <br> at that point. GitHub, Gitee, Qiita and Zenn render it as a line break. If your renderer strips HTML, set Line breaks to Space.
Why does a pipe character break my table?
Every unescaped | starts a new cell, even inside `code`. The tool writes \| for a pipe in a cell. A backslash followed by a pipe is written \\\|, because \\| is read as one cell by GitHub but as two cells by micromark (remark, MDX, Astro).
Can I paste cells from Excel or Google Sheets?
Yes. Click any cell and paste. If the clipboard has an HTML table, the tool reads it (merged cells are split and line breaks inside cells are kept); otherwise it reads tab-separated text. Empty cells, including an empty top-left cell, stay in place.
Why do my columns not line up in my editor?
The tool pads each cell to the same display width: CJK characters and emoji count as 2 columns, as in Unicode UAX #11. Columns line up in a font where those characters are exactly twice as wide as ASCII, such as a terminal or a CJK monospace font. Proportional fonts never line up.
Is my table sent to a server?
No. Editing, import and the preview run in your browser. The page remembers only the output options (layout, cell text, line breaks, ambiguous width and the Markdown or Preview view) on this device, not the table.