EthicalFusion

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

  1. Only lines containing a | are kept, so headings and paragraphs around the table disappear.
  2. The delimiter row is recognised and removed, including alignment variants such as :---, :---: and ---:.
  3. A leading and trailing pipe on each line is removed if present, so tables written with or without outer pipes both work.
  4. The line is split on every remaining pipe, and spaces around each cell are trimmed.
  5. 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.

Frequently asked questions

Do I need to remove the text around the table first?
No. Lines without a pipe character are ignored, so only the table rows are converted.
Is the alignment row with colons handled?
Yes. Delimiter rows such as :---, :---: and ---: are recognised and left out of the CSV.
Why did a cell containing an escaped pipe split into two?
The converter splits on every pipe, including escaped ones. Replace each backslash-pipe with another character before converting.
Are bold and italic marks removed?
No. Markdown formatting is kept as typed, so remove asterisks or underscores afterwards if you need plain text.
Can I convert a table without outer pipes?
Yes. Leading and trailing pipes are optional, and rows written without them are split the same way.

Related tools

Embed this tool on your site

Paste it into any blog or website. Free, with a credit link.