Convert Markdown tables to CSV and Excel, and back, with a live view of how the cells split
This Markdown table to CSV converter turns tables written with | and --- into CSV or Excel files, and turns CSV or cells copied from Excel into Markdown tables. You do not have to cut the table out first. Paste a whole document and the tool finds every table that GitHub would draw (GFM tables), and names each one after the heading right above it.
The input format is detected for you. If there is a Markdown table, it converts to CSV; if the text is split by commas, semicolons or tabs, it converts to a Markdown table. A preview in the middle shows whether the cells were split correctly. When writing Markdown it pads the columns so the lines line up, and when saving Excel it creates one sheet per table and stores number columns as numbers.
When this is useful
- Moving a table from an AI answer into Excel or Google Sheets: on services where the copy button hands over the answer as Markdown source, the table arrives as text like
| Plan | Monthly price |. Pasted straight into a sheet it lands in one cell. Press "Copy as table" here and the cells stay separate, or press "Excel" to get an .xlsx file. Marks such as**bold**are removed and only the text is kept. - Putting an Excel table into a README, issue or wiki: copying cells from a sheet puts tab-separated text on the clipboard. Paste that text here and it becomes a Markdown table, with number-only columns starting right-aligned (
---:). - Collecting tables scattered through one document: if meeting notes or a report contain several tables, you get one Excel file with a sheet per table, each named after the heading just above it.
- Tidying a Markdown table so it is easy to read: converting Markdown to Markdown pads the columns so the vertical bars line up in a monospaced editor. Wide characters such as CJK text are counted as two letters wide.
- Finding out why a table breaks: if the delimiter row has a different number of cells than the header, or is missing, GitHub shows plain text instead of a table. This tool tells you which line is the problem and fixes the delimiter row with one button.
How to use it
- Add the input: paste a Markdown document or table, CSV, or cells copied from Excel or Google Sheets into the input box. For MD, CSV, TSV or TXT files, use "Open file" or drag the file onto the box. The starting example is fully selected when you click the box, so pasting replaces it at once.
- Check the detected format: next to "Auto" you see what was detected (number of tables, CSV delimiter, TSV). If it read the text wrongly, choose Markdown, CSV or TSV yourself. For CSV you can also decide whether the first row is a header.
- Choose the output and the table: pick "Markdown table" or "CSV". If the document has several tables, press a table-name button or click inside the table you want in the input box.
- Set the alignment: each press on a column heading at the top of the grid (A, B, C…) cycles through none, left, center and right. The choice goes into the Markdown delimiter row and into the cell alignment of the Excel file.
- Take the result: "Copy" puts the source below on the clipboard, and "Copy as table" puts a table for Excel, Sheets or documents. The save buttons write .md, .csv or .tsv files, and "Excel" writes an .xlsx file. What you enter is not sent to a server and is not stored.
GitHub Markdown table (GFM) syntax
These are the table rules of the GFM specification, which GitHub and many note apps follow. When this tool looks for tables in a document, it applies the same rules.
| Part | Rule | Example |
|---|---|---|
| Header row | The cells of the first line become the column names. An empty cell still counts as a column. | | Name | City | |
| Delimiter row | Directly under the header, with hyphens in every cell. It must have the same number of cells as the header, or it is not a table. | | --- | --- | |
| Alignment | Set by the position of colons. With no colon, the column has no set alignment. | :--- left, :---: center, ---: right |
Outer | | The | at the start and end of a line may be left out, but the ones between columns are required. | Name | City |
| inside a cell | Written as \|. This also applies inside code wrapped in backticks. | `a\|b` |
| Formatting in a cell | Bold, italic, code and links work, and a line break inside a cell is written as <br>. | **important**, line 1<br>line 2 |
| Rows with a different cell count | Missing cells are filled with empty ones and extra cells are discarded. | | a | b | c | in a 2-column table drops c |
| Where the table ends | At a blank line, or at a line where another block starts, such as a heading, quote, list or code block. | # Next section, - list item |
What changes between the two formats
| Item | Markdown → CSV / Excel | CSV / Excel → Markdown |
|---|---|---|
| Splitting cells | | becomes a comma (semicolon or tab can be chosen) | The delimiter becomes | |
| inside a cell | \| is unescaped to | | | is written as \| |
| Commas and double quotes | The cell is wrapped in double quotes and each " inside becomes "" (RFC 4180) | Quotes are removed and only the text stays |
| Line break in a cell | <br> becomes a line break in the cell (when removing formatting marks is on) | A line break becomes <br> |
| Alignment | Not stored in CSV; becomes cell alignment in Excel | Number-only columns start right-aligned |
| Formatting marks | **bold**, `code` and link marks are removed, leaving the text (can be turned off) | A \ is added before *, _ or ~ that could be read as formatting, so they show as typed (can be turned off) |
| Header | The Markdown header row becomes the first row | The first row is the header; if turned off, "Column 1, Column 2…" is created |
| Rows with a different cell count | Filled or dropped by the GFM rules and marked in the grid | Padded with empty cells to the longest row |
Example: the same table, converted
CSV → Markdown table
This CSV has a cell with a comma wrapped in double quotes, and a double quote written twice inside a cell.
Product,Price,Note
"Keyboard, wireless",45.90,"""Quiet"" switches"
Mouse,19.00,6 buttons | symmetric shape
USB hub,12.50,*4 ports* expansion
As a Markdown table the quotes are removed, the | inside a cell becomes \|, and *4 ports*, which would read as italics, becomes \*4 ports\*. The price column holds only numbers, so it starts right-aligned.
| Product | Price | Note |
| ------------------ | ----: | ---------------------------- |
| Keyboard, wireless | 45.90 | "Quiet" switches |
| Mouse | 19.00 | 6 buttons \| symmetric shape |
| USB hub | 12.50 | \*4 ports\* expansion |
Markdown table → CSV
This Markdown table mixes bold, code, a link, a line break inside a cell and an escaped |.
| Item | Amount | Note |
| :--- | ---: | --- |
| **Travel** | 12,000 | Taxi<br>(late night) |
| Team snacks | 8,500 | Coffee \| cookies |
| `Adjustment` | -3,000 | [Refund](https://example.com) applied |
With the default setting, removing formatting marks is on: the marks disappear, <br> becomes a line break inside the cell, and any cell with a comma or a line break is wrapped in double quotes.
Item,Amount,Note
Travel,"12,000","Taxi
(late night)"
Team snacks,"8,500",Coffee | cookies
Adjustment,"-3,000",Refund applied
With removing formatting marks off, the original marks stay as written, such as **Travel**, Taxi<br>(late night) and [Refund](https://example.com) applied. When you save as Excel, 12,000 and -3,000 become number cells (with a #,##0 format), so you can sum them right away.
Column width alignment and character width
Aligning column widths pads each cell with spaces so the vertical bars | line up. In a monospaced font, Chinese, Japanese and Korean characters and most emoji are drawn two letters wide, so characters that Unicode UAX #11 (East Asian Width) classes as wide count as 2 columns, and combining characters count as 0. In the example above, "Keyboard, wireless" is 18 columns and "USB hub" is 7, so "USB hub" gets 11 spaces of padding.
- Characters of "ambiguous width", such as ① or curly quotes, count as 1 column. In an editor that draws them wide, for example with a CJK font, only that line may look slightly off.
- In a proportional font the width of a space differs from letter to letter, so the lines do not look aligned. Spaces do not change the table itself, so a table rendered on GitHub looks the same with alignment on or off.
- If one cell is very long, every line grows to that width. When source length matters, turn off "Align column widths" to write the compact form, such as
| a | b |.
Taking it to Excel or Google Sheets
Saving CSV and the BOM
The CSV is saved as UTF-8. According to Microsoft support, a UTF-8 CSV that starts with a BOM (byte order mark) opens correctly in Excel; without a BOM, you can import it from the Data tab with From Text/CSV and choose UTF-8. That is why "BOM" is on by default. Turn it off if the file is going to a program that would read the BOM as text. Excel set to use a comma as the decimal separator uses a semicolon as the CSV list separator, so for files going to such a setup, choose the semicolon as the delimiter.
Saving an Excel file (.xlsx)
- If the document has several tables, each table gets its own sheet, named after the line just above it (a
#heading, an underlined heading or a line of bold text). To follow Excel's rules,/ \ ? * : [ ]become spaces, the name is cut at 31 characters, and a duplicate gets " (2)" added. - The header row is made bold and frozen, and the alignment you chose is carried over to cell alignment.
- Values that can be turned back into the same text, such as 9,900 or 1.50, go in as number cells. Values with leading zeros like 0012, numbers of 12 or more digits, and values like 12% go in as text cells so they keep their shape.
- An Excel cell holds up to 32,767 characters, so longer cells are cut and the status line tells you (Excel's specification limit is 1,048,576 rows by 16,384 columns).
Copy as table
"Copy as table" puts an HTML table and tab-separated text on the clipboard together. Pasted into Excel or Google Sheets, the cells separate; pasted into a document editor such as Google Docs or Word, it becomes a table. If any cell is covered by the formula guard below, the HTML table is left out and only the tab-separated text is copied.
Formula guard
Spreadsheets can run a cell that starts with =, +, - or @ as a formula. For Excel, OWASP describes wrapping such cells (including those starting with a tab or a line break, and the full-width =+-@) in quotes and putting a tab character first. With "Formula guard" on, this tool writes =1+1 as "⇥=1+1" (⇥ is a tab). One-character cells and signed numbers such as -3,000 are left alone. OWASP also notes that saving the file again in Excel may undo this protection, and since the cell text gains a tab, turn the guard off for a CSV that another program will read.
Common mistakes
- Delimiter row with a different number of cells than the header: with
|---|---|under| a | b | c |, you see plain text instead of a table. This tool tells you the line number and "Fix delimiter row" makes the counts match. - Writing a sentence right under the table with no blank line: a line without
|still becomes the last row of the table (GFM spec example 202). Leave one blank line when the table ends. - Starting a row with
-or1.: if you leave out the leading|and a row begins like- item | valueor1. prepare | 5 min, it reads as a list and the table ends there. Put|at the start of the row. - Leaving
|as is inside code: even inside backticks,|splits the cell. Write`a\|b`(GFM spec example 200). - Indenting a table by four or more spaces: an indented line becomes a code block and is not read as a table. For a table inside a list, indent to the position of the list text.
- Using just one hyphen: the GFM spec accepts
|-|-|as a table, but GitHub's help page states three or more hyphens. This tool always writes three or more. The same help page says to put a blank line before the table, so leave one before pasting the result into a document. - Opening a CSV directly in Excel: 0012 can become 12, and numbers of 12 or more digits can turn into exponent form. Save as .xlsx if the shape matters; these values go in as text cells.
Limits
- Markdown tables have no merged cells and no multi-line cells, so merged cells in Excel can only be carried over as expanded cells. HTML
<table>is not read, so convert an HTML table with the HTML to Markdown converter first. - Table detection follows the GFM rules GitHub uses. Other editors may read lines with only
|, or lines that start like a list, differently. A deeply indented table inside a list may not be found. - Removing formatting marks and the table preview handle only common notation (bold, italic, strikethrough, code, links, images,
<br>, HTML tags, character references). Asterisks inside a word, as in2*3*4, are not removed, so the preview can differ from GitHub in some cases where it draws italics. - Spaces at the start and end of a Markdown cell disappear, so leading or trailing spaces in a CSV value are not visible after converting to Markdown.
- Files up to 10 MB are read, tables up to 500,000 cells and 1,000 columns. The preview draws the first 200 rows and 40 columns and the source view the first 400 lines; copy and save include everything.
- Files are read as BOM, UTF-8 or UTF-16; if many bytes are not valid UTF-8, the file is read as Windows-1252. Excel workbooks (.xlsx, .xls) are not read directly, so copy the table in Excel and paste it here.
Sources
Basis: table syntax comes from the GFM 0.29-gfm specification and GitHub Docs, CSV rules from RFC 4180, the formula guard from OWASP, and Excel behavior and limits from Microsoft support pages, all checked on October 22, 2026. Table detection and escape results were cross-checked by rendering again with marked (GFM) and markdown-it.
- 01GitHub Flavored Markdown Spec 0.29-gfm — Tables (extension)Header and delimiter rows, alignment, \| inside a cell (also in code, example 200), where a table ends (examples 201 and 202), rows with a different cell count (example 204)
- 02GitHub Flavored Markdown Spec 0.29-gfm — Strikethrough (extension)A single tilde pair also makes strikethrough (example 491), which is why ~ in CSV values is escaped
- 03GitHub Docs — Organizing information with tablesThree or more hyphens, a blank line before the table, alignment colons, \| escape
- 04CommonMark Spec 0.31.2Backslash escapes, emphasis (* _), code, links, autolinks, HTML and character references
- 05RFC 4180 — Common Format and MIME Type for CSV FilesQuoting cells that contain commas, double quotes or line breaks; CRLF line endings
- 06OWASP — CSV InjectionCharacters that start a formula, the tab-inside-quotes mitigation and its limit when the file is saved again
- 07Microsoft Support — Opening CSV UTF-8 files correctly in ExcelUTF-8 CSV with a BOM, and importing with From Text/CSV
- 08Microsoft Support — Import or export text (.txt or .csv) filesSetting the decimal separator to a comma makes the CSV list separator a semicolon
- 09Microsoft Support — Excel specifications and limits1,048,576 rows by 16,384 columns, 32,767 characters per cell
- 10Microsoft Support — Rename a worksheet31 characters, no / \ ? * : [ ], no leading or trailing apostrophe, no History
- 11Unicode Standard Annex #11 — East Asian WidthWide (W, F) and ambiguous (A) width classes
Frequently asked questions
How do I move a Markdown table into Excel?
Paste the table and press "Excel" to save an .xlsx file. To skip the file, press "Copy as table" and paste into cells in Excel or Google Sheets. If the document has several tables, the Excel file gets one sheet per table.
How do I turn a table from Excel or Google Sheets into Markdown?
Select the cells in the sheet, copy them, and paste into the input box. Copied cells arrive as tab-separated text (TSV), which the tool detects and converts to a Markdown table. Columns with only numbers start right-aligned, and you can change that by clicking the column heading.
What do the colons (:) in the delimiter row mean?
They set column alignment. :--- is left, :---: is center and ---: is right; with no colon the alignment is not set. CSV has no alignment, so no colons end up in the values, and an Excel file carries the alignment over to the cells.
How do I put a | character inside a cell?
In a Markdown table it must be written as \| so the cell does not split. The same applies inside code wrapped in backticks. The tool turns \| into | when reading Markdown and writes \| again when producing Markdown.
How wide does column alignment count wide characters like Chinese or Japanese?
CJK characters and emoji are drawn two letters wide in monospaced fonts, so they count as 2 columns when padding with spaces (Unicode UAX #11). In a proportional font the lines can look slightly off, but spaces do not change the table, so the result on GitHub is the same.
Why do accents and special characters look broken when I open a CSV in Excel?
A UTF-8 CSV without a BOM may be read by Excel in another encoding. Save with "BOM" on and Excel opens it directly; for a file saved without it, use the Data tab, From Text/CSV and choose UTF-8. Saving as .xlsx avoids the encoding problem.
What does the formula guard change?
A cell starting with =, +, - or @ can run as a formula in Excel, so the tool wraps it in quotes with a tab character first, as OWASP recommends. One-character cells and signed numbers like -5 are left alone. The cell text changes, so turn the guard off for a CSV another program will read.
What does removing formatting marks delete?
When saving Excel, CSV or copying as a table, it removes the marks of **bold**, `code`, ~~strikethrough~~ and [links](url), keeping only the text, and turns <br> into a line break in the cell. Asterisks inside a word like 2*3*4 and a single tilde as in 10~20 stay. Markdown output keeps the marks.