About Markdown Table to CSV
Tables in READMEs and wikis look tidy, but pasting one into a spreadsheet puts every row in a single cell, pipes and all. This tool takes the table back to real columns. You can paste only the table, or a whole Markdown document and let it find the tables for you.
The conversion handles what trips up a quick find and replace. Commas inside a cell would otherwise create extra columns, so such cells are quoted. An escaped \| is a literal pipe and not a column break. Bold markers, link syntax and backticks are removed, so a cell written as Desk arrives as Desk.
The result is ready for Excel, Google Sheets, a database import or a script. If a document holds more than one table, a Table menu appears so you can choose which one to convert.
How it works
The text is scanned line by line for a row containing a pipe, followed by a divider row such as | --- | --- |. Rows then continue until a blank line or a line with no pipe, which is what keeps two tables from merging and stops surrounding text from being read as data. Anything inside a fenced code block is ignored, since a table shown as an example is not your data. Outer pipes are optional, and the divider's alignment colons are dropped because CSV has no way to express them.
With Remove Markdown formatting on, each cell is parsed as inline Markdown and reduced to its visible text, entities are decoded, and a <br> becomes a real line break inside the cell. Quoting follows the convention in RFC 4180: a value containing the separator, a double quote or a line break is wrapped in double quotes, and any double quote inside it is doubled.
Rows shorter than the widest row are filled with empty cells, so every row has the same number of columns. Choosing Tab as the separator names the download table.tsv.
How to use Markdown Table to CSV
- Paste a table or a Markdown document into the left pane, or press Try an example.
- Check the CSV on the right. If several tables were found, choose one from the Table menu.
- Open Options to pick Comma, Semicolon or Tab, or to keep the Markdown formatting.
- Press Copy result, or use Download .csv.
Formatting removed, a comma quoted, a pipe unescaped
| Item | Price | Note |
|---|--:|---|
| **Lamp** | 12 | warm, dimmable |
| [Desk](https://example.com/desk) | 90 | 2\|3 parts |Item,Price,Note
Lamp,12,"warm, dimmable"
Desk,90,2|3 parts"warm, dimmable" needs quotes because of its comma, while 2|3 parts does not, since a pipe means nothing in CSV.
When it helps
- Pulling a pricing or comparison table out of a README so you can sort and total it in a spreadsheet.
- Importing a table kept in project docs into a database or a script.
- Reusing a table written for a pull request in a report that a colleague edits in Excel.
- Extracting one table from a long wiki export without copying the rows by hand.
Tips for a better result
- Spreadsheets in many European locales use a comma as the decimal mark and expect semicolons between columns. If your columns all land in one, switch to Semicolon.
- Excel may misread accented characters when you double-click a CSV file, because the download is UTF-8 with no byte order mark. Use its Get Data or Import option and choose UTF-8.
- Turn off Remove Markdown formatting if the cells must keep their links, such as
Desk, for a later step.
Good to know
- It needs a divider row. Without one, a block of pipe-separated text is not a Markdown table and you get an error saying so. Add the divider, or treat the text as delimited data.
- A table written with no pipes on a row is not recognized past that row, because rows are found by their pipes.
- Values are copied as text. Numbers, dates and currency symbols are not reformatted, and a spreadsheet will apply its own interpretation when you open the file.
- A cell beginning with
=,+,-or@is written unchanged, and a spreadsheet may treat it as a formula. Check tables from sources you do not trust. - HTML-style tables in Markdown are not read, so convert those with HTML to Markdown first.
Questions people ask
What if my document has several tables?
All of them are found, and a Table menu appears above the output, labeled with each table's first column names. Choose one and the CSV updates. Each table is converted separately, as they rarely share columns.
Why did a cell get wrapped in quotes?
It contains the separator, a double quote or a line break, and quotes are how CSV says those characters belong to the value. Spreadsheets remove them on import. You will not see them in the cell.
What about pipes inside code in a cell?
Markdown tables split on every unescaped pipe, even inside backticks, so such a cell must be written with "\|". Written that way it converts correctly. Without the backslash, GitHub and this tool both read it as a new column.
Does the column alignment carry over?
No, because CSV holds only values. Colons in the divider row are read to recognize the row and are then dropped, so set alignment again in your spreadsheet.
What to use next
- CSV to Markdown Table: to send edited data back into your documentation
- CSV to JSON: if a script or API needs the same data as JSON
- CSV to Excel: for a real spreadsheet file that avoids import settings
- Markdown Previewer: to see how a table renders before you extract it
Last reviewed . Read our editorial policy.