Markdown Table to CSV
Extract a Markdown table back into clean CSV data.
Was this tool helpful?
Thanks for the feedback!
Paste a Markdown table and this converter turns it back into CSV, dropping the dashed separator row and the outer pipes. It is useful for pulling data out of README files, GitHub issues, wikis or AI-generated answers into a spreadsheet or script.
Example
Surrounding text is fine; any line without a pipe character is ignored. Input:
Some intro text | Name | City | Score | |:-----|:----:|------:| | **Asef** | Mumbai, MH | 91 | | Riya | Pune | 88 | More text
Output after clicking Convert to CSV:
Name,City,Score **Asef**,"Mumbai, MH",91 Riya,Pune,88
How each line is processed
- Only lines containing a
|are kept, so headings and paragraphs around the table disappear. - The delimiter row is recognised and removed, including alignment variants such as
:---,:---:and---:. - A leading and trailing pipe on each line is removed if present, so tables written with or without outer pipes both work.
- The line is split on every remaining pipe, and spaces around each cell are trimmed.
- Each value is written in CSV form: values containing a comma, a double quote or a line break are wrapped in quotes, and inner quotes are doubled. That is why "Mumbai, MH" came out quoted.
Things to clean up before or after
Escaped pipes inside cells
Markdown lets you write \| for a literal pipe inside a cell, but this converter splits on every pipe, escaped or not. A cell like Pro \| Yearly is broken into two values, "Pro \" and "Yearly", which shifts the rest of that row. Replace \| with another character such as a slash before converting, then change it back in your spreadsheet.
Formatting marks
Bold, italics, inline code and links are kept as raw Markdown, as with **Asef** in the example. Use find-and-replace in your spreadsheet to remove ** or backticks if you need plain values.
Several tables in one paste
All lines with pipes are merged into one output, so two tables pasted together become one long CSV with a second header row in the middle. Convert one table at a time.
Rows with different lengths
Each row keeps however many cells it had; short rows are not padded. Check the column count in your spreadsheet if the source table was hand-written.
Opening the result
Copy the CSV into a text file saved with a .csv extension, or paste it into Google Sheets and use Data › Split text to columns. To get an Excel file directly, run the CSV through the CSV to Excel Converter. Going the other way, CSV to Markdown Table rebuilds a Markdown table from CSV. The conversion happens locally in the browser tab, so the pasted table is not uploaded.