Markdown Table to CSV
BetaPaste a GitHub-flavored Markdown pipe table, or a whole README with several, and download clean CSV. Escaped pipes, alignment rows and code fences are handled, and the same page turns a CSV back into a Markdown table.
- Free, no sign-up
- REST + MCP
- Updated
- Reviewed by Olgun Ozoktas
On this page, the Markdown is parsed and the CSV is built in your browser. Paste the raw Markdown or drop a .md file; the page does not fetch README links. Inline Markdown in a cell, such as **bold** or a [link](url), is kept as written.
The CSV will appear here..
How to Convert a Markdown Table to CSV
-
Add the Markdown
Paste the Markdown into the Markdown panel, upload a .md file, or drop it on the panel. The tables are found as soon as the text arrives. -
Pick the table
If the text holds more than one table, pick one in Table. Each entry gives its number, the line it starts on, and its rows and columns. -
Set the separator and header
Choose the separator your spreadsheet expects and whether the header row goes into the CSV. Turn on Excel BOM if Excel on Windows shows accented letters wrongly. -
Read the notes and download
Read the notes. They name any line whose cells did not match the header. Then download the CSV or copy it. -
Go back to Markdown
To go the other way, switch the direction to CSV to Markdown. The CSV you just made moves into the input, so you can check the round trip.
Common Use Cases
README tables to a spreadsheet
API docs to test data
Wiki tables you need to edit
CSV into a pull request
Check a hand-written table
Why Use Markdown Table to CSV?
A GitHub-flavored Markdown table is a header row, a delimiter row and data rows, with pipes between the cells. The delimiter row holds one run of dashes per column, optionally with colons that set the alignment: :--- for left, :---: for center, ---: for right. The pipes at the start and end of a line are optional. The table ends at a blank line or at the start of another block, such as a heading, a quote or a code fence.
This page follows those rules. It scans the whole text, ignores lines inside ``` and ~~~ fences, and lists every table it finds by number, with the line it starts on and its size. The table you pick is written as CSV: the delimiter row is dropped, cells are trimmed, \| becomes a literal pipe, and other backslashes stay as typed. A row with fewer cells than the header is padded with empty cells and extra cells are dropped, which is what GitHub shows; both are reported by line number. Quoting follows RFC 4180, so a cell that holds a comma or a quote is quoted. The parser is run() from the markdown_table_to_csv module, so the page and the API read a table the same way.
The reverse direction reads a CSV with an RFC 4180 reader, so a quoted cell may hold the separator, and writes a GitHub-flavored table with the alignment you choose. A pipe in a cell is escaped as \|, and a line break inside a cell becomes a space, because a Markdown table row is one line. For a JSON array, JSON to Markdown Table does the same job. HTML tables are a different format: use HTML Table to JSON for those.
How it compares
Replacing pipes with commas in an editor works until a cell holds a comma or an escaped pipe. pandoc and pandas read Markdown tables reliably, if they are installed and you remember the options. The Markdown Table Generator builds tables but does not read them back. This page is the paste-and-download step: every table in a README is listed, code fences are skipped, and the CSV is quoted for a spreadsheet.
Markdown Table Tips
- A pipe inside a cell must be written as \| in Markdown. The CSV gets a plain |. A pipe inside backticks still splits the cell, as it does on GitHub, so escape it there too.
- A table is a header row followed by a delimiter row such as | --- | :---: | ---: | with the same number of cells. Without that row, the lines are a paragraph, not a table.
- Tables inside ``` or ~~~ code fences are skipped, so a SQL snippet or a table shown as an example is not picked up.
- A row with fewer cells than the header gets empty cells. Extra cells are dropped, because GitHub drops them when it renders the table; the notes name those lines.
- Inline Markdown stays as written: **Team** stays **Team** and a link stays [text](url). Remove the markup in the spreadsheet if you only want the text.