Practical guidesLists & tables

Convert a Markdown table to CSV.

Turn a GitHub-style Markdown table into CSV for a spreadsheet. Keep leading zeros, quote cells that contain commas, and check the cell preview before you import the file.

Open the table converter

Copy a table with a header and a separator row

The converter expects a Markdown table with a header row and a separator row such as | --- | --- |. Alignment colons in the separator are accepted, but alignment is not written into the CSV. Each row should have the same number of columns.

A pipe that belongs inside a cell should be escaped as \|. Line breaks that were stored as <br> in a cell are turned back into line breaks, and that cell will be quoted in the CSV.

Example input

| Product | Code | Status |
| --- | --- | --- |
| Notebook | 00123 | In stock |
| Pen, blue | 00456 | On order |

Choose Markdown input and CSV output

Open the table converter, set From to Markdown table and To to CSV, paste the table and press Convert table. Swap formats ⇄ exchanges the two formats if you need to go back the other way.

Use the cell preview to confirm that Product, Code and Status are separate columns and that 00123 still has its leading zeros. If the tool reports that the separator does not match the header, check for a missing or extra pipe.

Example result

Product,Code,Status
Notebook,00123,In stock
"Pen, blue",00456,On order

Import the CSV and check quoted cells

Copy or download the result and open it in your spreadsheet. A cell that contains a comma, a quote or a line break is wrapped in double quotes, which is why Pen, blue stays together as one Status-adjacent product name rather than splitting into an extra column.

CSV is a data format: typographic styling from the Markdown is not carried across. If you need tab-separated cells for another paste, choose TSV as the output.

Choose a different output when you need it

To put the table back into Markdown, follow the spreadsheet-to-Markdown guide, which starts from copied spreadsheet cells. JSON output from this converter is an array of row arrays of text cells, including the header, and does not produce an object per row; use the CSV to JSON converter when you want objects. The table is processed in your browser.

Open the table converter