▤

Markdown Table Generator

Turn tabular text into a Markdown table

Paste rows separated by new lines and columns separated by tabs, commas, or semicolons.

Markdown Table Generator — what it does

Paste rows separated by line breaks and columns separated by tabs, commas or semicolons, choose column alignment, and get a Markdown table with the separator row already correct. Typing pipe tables by hand is tedious and easy to misalign; generating them takes one paste.

Worked example

Three columns copied from a spreadsheet (tab-separated) turned into a Markdown table with Column alignment left on Automatic.

Input — tab-separated rows

Item	Qty	Unit price
Standing desk	2	399.00
Monitor arm	4	59.90
Cable tray	10	12.50

Output — Markdown table

| Item | Qty | Unit price |
| --- | --- | --- |
| Standing desk | 2 | 399.00 |
| Monitor arm | 4 | 59.90 |
| Cable tray | 10 | 12.50 |

The first row always becomes the header. Choosing Right instead of Automatic changes only the separator row, to | ---: | ---: | ---: |.

When this tool helps

  • Adding a table to a README, wiki page or pull request description.
  • Converting a spreadsheet selection into Markdown by pasting it straight in.
  • Documenting parameters, options or comparison data in a repository.

How to use it

  1. Paste the table data, one row per line.
  2. Let the tool detect tabs, commas or semicolons as column separators.
  3. Choose column alignment.
  4. Process and copy or download the Markdown.

Accuracy, limits, and good practice

  • Copying a range from a spreadsheet pastes tab-separated, which is the cleanest input here because tabs rarely appear inside cell values.
  • Right-align numeric columns so the digits line up; centred numbers are noticeably harder to compare down a column.
  • The alignment colons live in the separator row — that row is what every Markdown renderer reads to decide column behaviour.

Frequently asked questions

How do I include a pipe character in a cell?

Escape it with a backslash, or the renderer will treat it as a column boundary and break the row.

Do all Markdown renderers support tables?

Tables come from GitHub Flavored Markdown and are supported by GitHub, GitLab, most static site generators and nearly every wiki.

What if my data has multi-line cells?

Markdown tables cannot hold real line breaks inside a cell; shorten the content or use a break tag where it is supported.

How does it decide whether my data is tab-, semicolon- or comma-separated?

If any line contains a tab, every line is split on tabs; otherwise, if any line contains a semicolon, on semicolons; otherwise the text is parsed as CSV, where quoted values may contain commas. A single stray tab anywhere therefore switches the whole paste to tab mode, and a semicolon inside a comma-separated cell switches it to semicolon mode.

What happens to rows with a different number of cells?

Every row is padded with empty cells to the width of the widest row, so a short row renders with blank cells rather than breaking the table; if a data row is wider than the header, the header gains empty columns too. The alignment choice applies to every column at once — edit the separator row by hand for mixed alignment. The Download button saves the table as table.md.

Related tools on this site

Everything above runs inside this page. Markdown Table Generator needs no account, no upload, and no server round trip — close the tab and nothing is left behind.

Markdown 表格產生器能做什麼

貼上以換行分隔的資料列、以 Tab、逗號或分號分隔的欄,選好欄位對齊方式,就能得到分隔列已經正確的 Markdown 表格。手打直線表格既瑣碎又容易對不齊,用產生的只需要貼一次。

實際範例

從試算表複製的三欄資料(以 Tab 分隔),在「欄位對齊」維持「自動」的設定下轉成 Markdown 表格。

來源:Tab 分隔的列

Item	Qty	Unit price
Standing desk	2	399.00
Monitor arm	4	59.90
Cable tray	10	12.50

轉換後:Markdown 表格

| Item | Qty | Unit price |
| --- | --- | --- |
| Standing desk | 2 | 399.00 |
| Monitor arm | 4 | 59.90 |
| Cable tray | 10 | 12.50 |

第一列一律成為表頭。把「自動」改成「靠右」只會改變分隔列,變成 | ---: | ---: | ---: |。

什麼時候用得上

  • 為 README、Wiki 頁面或 Pull Request 說明加上表格。
  • 把試算表選取範圍直接貼進來,轉成 Markdown。
  • 在儲存庫中記錄參數、選項或比較資料。

使用步驟

  1. 貼上表格資料,一列一行。
  2. 由工具偵測 Tab、逗號或分號作為欄位分隔。
  3. 選擇欄位對齊方式。
  4. 執行處理,複製或下載 Markdown。

精確度、限制與實務建議

  • 從試算表複製範圍時貼上的是 Tab 分隔,這是最乾淨的輸入,因為儲存格內容很少含 Tab。
  • 數字欄請靠右對齊讓位數對齊;置中的數字在同一欄裡明顯更難比較。
  • 對齊用的冒號寫在分隔列——所有 Markdown 渲染器都靠那一列決定欄位行為。

常見問題

儲存格裡要放直線符號怎麼辦?

用反斜線逸出,否則渲染器會把它當成欄位邊界,整列就散了。

所有 Markdown 渲染器都支援表格嗎?

表格源自 GitHub Flavored Markdown,GitHub、GitLab、多數靜態網站產生器與幾乎所有 Wiki 都支援。

資料有多行儲存格怎麼辦?

Markdown 表格的儲存格不能有真正的換行;請縮短內容,或在支援的環境使用換行標籤。

工具怎麼判斷資料是以 Tab、分號還是逗號分隔?

只要任一行含有 Tab,每一行都以 Tab 切分;否則若任一行含分號,就以分號切分;再否則整段文字以 CSV 方式解析,加引號的值裡可以含逗號。因此任何位置多一個 Tab 就會讓整份貼上的內容改走 Tab 模式,逗號分隔的儲存格裡若有分號也會改走分號模式。

某些列的儲存格數量與表頭不同會怎樣?

每一列都會補上空儲存格,補到最寬那一列的寬度,所以較短的列會顯示空白格而不會讓表格壞掉;若資料列比表頭寬,表頭也會多幾個空欄。對齊的選擇會同時套到每一欄,想混合對齊請手動修改分隔列。「下載」按鈕會把目前顯示的表格存成 table.md。

本站相關工具

以上步驟全部在這個頁面內完成,Markdown 表格產生器 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。