Markdown Table to CSV Converter – Free & Instant

Convert a Markdown table to CSV instantly in your browser — no upload, no signup. Handles quoted fields, numbers, and GFM alignment rows. Free.

Markdown
94 chars · 4 lines · 94 bytes
CSV

Turn a Markdown Table into a Clean CSV in Seconds

Paste your Markdown table above and get a properly formatted CSV file back instantly — no signup, no upload, nothing leaves your browser. It works whether you copied the table from a README, a wiki, or a docs site.

Quick example — same table, two formats:

Markdown input:
| Name    | Score | Grade |
|---------|-------|-------|
| Alice   | 95    | A     |
| Bob     | 82    | B     |
CSV output:
Name,Score,Grade
Alice,95,A
Bob,82,B
Paste your Markdown table into the converter above, then copy or download the result. Quoted fields and numeric values are handled automatically. Everything runs in your browser — nothing is uploaded.

How to Convert Markdown to CSV

  1. Copy your Markdown table — from a README, GitHub, Notion, or anywhere else.
  2. Paste it into the input box above and select Markdown as the source format.
  3. Choose CSV as the output format.
  4. Hit Convert — the CSV appears instantly in the output panel.
  5. Copy to clipboard or click Download to save the .csv file.

Worked Example: Markdown Table to CSV

Say you have this product table in a Markdown file:

| Product     | Price  | In Stock |
|-------------|--------|----------|
| Widget A    | 12.99  | Yes      |
| Gadget B    | 249.00 | No       |
| Doohickey C | 3.50   | Yes      |

After conversion, you get a clean CSV ready to open in Excel, Google Sheets, or any data tool:

Product,Price,In Stock
Widget A,12.99,Yes
Gadget B,249.00,No
Doohickey C,3.50,Yes

Notice that numeric values like 12.99 stay as numbers, not wrapped in quotes. If a cell contains a comma, the converter automatically wraps it in double quotes so the CSV stays valid.

How to Do This in Python

If you need to automate markdown table to CSV conversion in a script, here are two clean options:

Python — using the pandas library:

# Python 3 — requires: pip install pandas
import pandas as pd
import io

markdown = """
| Name  | Score |
|-------|-------|
| Alice | 95    |
| Bob   | 82    |
"""

# Strip pipe edges and split rows
lines = [l.strip() for l in markdown.strip().split('\n') if not set(l.strip()) <= set('|-: ')]
rows = [[cell.strip() for cell in line.strip('|').split('|')] for line in lines]

df = pd.DataFrame(rows[1:], columns=rows[0])
df.to_csv('output.csv', index=False)
print(df)

JavaScript — useful in Node.js or a browser script:

// Node.js or browser — no dependencies needed
function markdownTableToCsv(md) {
  const lines = md.trim().split('\n').filter(
    line => !line.replace(/[|\-: ]/g, '').length === 0 && !/^[|\s\-:]+$/.test(line)
  );
  return lines.map(line =>
    line.trim().replace(/^\|/, '').replace(/\|$/, '')
      .split('|')
      .map(cell => {
        const v = cell.trim();
        return v.includes(',') ? `"${v}"` : v;
      })
      .join(',')
  ).join('\n');
}

const md = `| Name  | Score |\n|-------|-------|\n| Alice | 95    |\n| Bob   | 82    |`;
console.log(markdownTableToCsv(md));
// Name,Score
// Alice,95
// Bob,82

For one-off conversions, the tool above is faster. Use the code route when you need to process dozens of files or embed conversion in a pipeline.

How It Works

Markdown tables follow a simple pipe-delimited syntax defined by the CommonMark spec and the GitHub Flavored Markdown (GFM) tables extension. The converter strips the pipe characters (|) and the separator row (the dashes line), then maps each remaining row to a comma-separated line.

If any cell value contains a comma, a double-quote, or a newline, it gets wrapped in double quotes — that follows the RFC 4180 CSV standard so the output is universally compatible. Numbers are kept unquoted; text with special characters is escaped correctly.

All processing runs client-side in your browser. Your table data is never sent to a server, so confidential or work data stays private.

When to Use This Tool (and When to Use Something Else)

Situation Best move
Copying a table from a README or wiki into a spreadsheet Use this tool
Sharing tabular data with a non-technical colleague Use this tool — CSV opens in Excel and Google Sheets
Batch-converting 50+ Markdown files Use the Python script above or a CLI tool
Table has merged/nested cells GFM tables don't support merging — clean the source first
You need JSON instead of CSV Switch the output format to JSON in the converter above, then use our JSON Beautifier to format it nicely

Related Tools You Might Need

Takeaway: If you have a Markdown table and need a spreadsheet-ready CSV, paste it into the converter above and download your file in a few seconds — no account required.

Frequently asked questions

Is my data uploaded to a server when I convert?+
No. The entire conversion runs inside your browser using JavaScript. Nothing is sent to any server, so your table data stays completely private — even if it contains confidential or work-related information.
Is this tool free? Do I need to sign up?+
It's completely free and requires no account or sign-up. Just paste your Markdown table and convert.
Why does my converted CSV look wrong in Excel?+
The most common cause is the file encoding. When you download, save the file as UTF-8 with BOM, or when opening in Excel choose 'Text Import Wizard' and select UTF-8. If cells are shifted, check your Markdown source for any missing pipe characters on a row.
Can it handle tables with colons in the separator row (for alignment)?+
Yes. GFM alignment syntax like |:------|:------:|------:| is recognized and stripped out. The alignment hints don't appear in the CSV output — only the data rows do.
How do I convert a Markdown table to CSV in Python?+
You can parse the pipe-delimited rows manually with plain Python (see the script on this page), or use the pandas library. For quick one-offs, the browser tool above is faster than writing a script.
What happens if a cell value contains a comma?+
The converter automatically wraps that cell in double quotes, following the RFC 4180 CSV standard. For example, a cell containing London, UK becomes "London, UK" in the output, so the comma isn't misread as a column separator.
Can I convert in the other direction — CSV back to a Markdown table?+
Yes. The same converter supports CSV-to-Markdown. Just switch the source and target formats in the tool above.
What other output formats can I export to besides CSV?+
The converter supports JSON, SQL INSERT statements, HTML tables, TSV (tab-separated), Excel-compatible formats, YAML, and more — just change the output format selector. If you export to JSON and want to format it nicely, try the JSON Pretty Print tool.