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
Aligned columns pads every cell with spaces to the widest cell of its column. Width is counted in display columns: Chinese, Japanese and Korean characters and emoji count as 2. Compact writes one space on each side of a cell and no padding. Markdown writes the cell as typed, so **bold**, `code` and links work. Plain text puts a backslash before the characters Markdown would read as formatting (* ` ~ [ $, and _ < & \ where they would count), so the cell shows what you typed. Pipes are escaped in both modes. A table row must stay on one line, so a line break inside a cell (Shift+Enter) is written as <br>. Choose Space if your renderer removes HTML. Affects the Aligned columns layout only. When on, characters whose width depends on the font (○ × ① →) count as 2 columns when cells are padded; when off they count as 1. Turn it on if your editor shows them as wide as CJK characters.

Click a cell and type. Enter moves to the cell below and adds a row after the last one; Shift+Enter starts a new line inside the cell. An Enter that confirms IME input does not move. Cells copied from Excel, Google Sheets or a web page can be pasted into any cell, and the table grows to fit. The selects above the headers set the alignment of each column: Default writes ---, Left :---, Center :---:, Right ---:. The grid shows the first 1,000 rows; the Markdown has all of them.
These buttons act on the selected cell: they insert or delete a row or column at it, move its column and sort the rows by its column. Sorting compares numbers when every non-empty cell in the column is a number and text otherwise; empty cells go last. Transpose swaps rows and columns and resets the alignment. Undo takes back the last button action, pasted range or import, up to 50 steps; typing in a cell is not a step. Clear resets the table to 3 × 3.
Markdown table Updates as you type. Preview draws the table with a GFM parser (micromark); HTML typed in a cell is shown as text, and only <br> becomes a line break. Copy Markdown and Download .md give the Markdown in either view; the file is named table.md.

Read the full guide Markdown Table Syntax: Alignment, Escaping Pipes, Line Breaks and Renderers
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. &copy; 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|b unescaped.
  • 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,city on 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.