DevTools Logo

Markdown Table to CSV Converter

Markdown Table to CSV

Extract pipe tables into clean CSV — alignment rows, escaped pipes and code spans handled.

Runs in your browser
Try an example

Markdown table

The converter tokenizes pipe rows with awareness of escaped pipes (\|) and backtick code spans, drops GFM alignment rows, strips optional inline formatting and serializes RFC 4180 CSV with a comma, semicolon or tab delimiter. Multiple tables in one paste can be combined or selected individually, ragged rows can be padded to a common width and HTML entities can be decoded on request. Everything runs locally in the browser.

  • README table — The alignment row is dropped and the header plus data become Name,Age / Ada,36.
  • Escaped pipe and code span — The escaped pipe stays inside one cell and the comma inside the code span is quoted in the CSV output.
  • Several tables — Choose Combine to export all tables with a blank line between, First only, or pick a specific table number.

CSV output

No CSV yet

Paste a Markdown pipe table or load an example.

Examples

README table

Input
| Name | Age |
| --- | ---: |
| Ada | 36 |
Output
Name,Age
Ada,36

Header preserved, alignment row removed.

Escaped pipe

Input
| Feature | Note |
|---|---|
| Pipe | a \| b |
Output
Feature,Note
Pipe,a | b

The backslash escape keeps the pipe inside its cell.

Code span with comma

Input
| Code |
|---|
| `a,b` |
Output
Code
"a,b"

Formatting is stripped, but the comma is quoted as part of the field.

About this tool

Markdown pipe tables look simple but a regex splitter breaks on the exact cases real documents contain: an escaped pipe inside a cell, a code span with a comma, or an alignment row full of colons and dashes. This converter tokenizes each line with escape and code-span awareness, removes the alignment row, then serializes the cells according to RFC 4180 so spreadsheets read them correctly.

You can choose comma, semicolon or tab output for different Excel locales, keep or strip inline formatting, include or omit the header row, pad ragged rows to a common width, and decode HTML entities from scraped pages. Several tables in one paste can be combined with blank lines or exported one at a time.

The preview shows table, row and cell counts plus notices about anything the parser adjusted. All work happens in your browser — documentation pasted here never reaches a server.

What this tool does not do

  • Only the GitHub-style pipe table grammar is supported; other Markdown table extensions are not parsed.
  • Multi-line cells and rowspan/colspan concepts do not exist in pipe tables.
  • Inputs over 5 MB are rejected to keep the browser responsive.
  • The converter extracts data; it does not reformat or restyle the original Markdown.

How to use this tool

  1. Paste a pipe table

    Copy a table from a README, issue or spec. Rows may start with a border pipe, and border-less rows work too.

  2. Pick output options

    Choose comma, semicolon or tab; decide whether to strip formatting, keep the header, normalize ragged rows and decode entities.

  3. Handle multiple tables

    Combine all tables, keep only the first, or choose one table by number when the paste contains several.

  4. Review notices

    The output panel reports ragged rows, short dash rows treated as data and any formatting choices that changed the result.

  5. Copy or download

    Copy the CSV to the clipboard or download table.csv. Shortcut: Mod/Ctrl+Shift+C copies the result.

Use cases

Docs to spreadsheet

Move an API options table from a README into a spreadsheet for a stakeholder review.

Spec extraction

Pull comparison tables out of a design document without manually deleting alignment rows.

Scraped pages

Decode entities and normalize ragged rows from tables copied out of HTML pages.

Conversion rules

Input / settingBehavior
Alignment rowCells matching :?-{3,}:? are dropped; short - or -- rows are kept as data with a notice
Escaped pipe\| becomes a literal pipe inside one cell
Code spanBackticks are removed (optional) but the content and any comma stay in the same cell
DelimiterComma, semicolon or tab; fields are quoted only when required
Ragged rowsPadded or truncated to the widest row when normalization is on, with a count reported
Multiple tablesCombined with blank lines, first only, or a selected table number

CSV uses CRLF line endings and doubles embedded quotes, matching RFC 4180 spreadsheet expectations.

Common mistakes

Mistake:Splitting rows on every pipe with a regex.

Fix:Escaped pipes and pipes inside code spans break that approach; use the tokenizer-aware converter instead.

Mistake:Assuming every dash row is an alignment row.

Fix:GFM requires three or more dashes. A row of - or -- is data; the tool reports it.

Mistake:Pasting into Excel with the wrong delimiter.

Fix:Choose semicolon or tab for locales where comma is the list separator.

Frequently asked questions

What happens to the alignment row?

Rows whose cells all match :?-{3,}:? — the GitHub-style alignment separator — are detected and removed before CSV output. A short row of one or two dashes is not a valid alignment row, so it is kept as data and reported in the notices panel.

Are escaped pipes handled?

Yes. The tokenizer treats \| as a literal pipe inside the current cell rather than as a separator. Cells that contain a pipe do not need special CSV quoting unless the chosen delimiter is also present, because a pipe is not a CSV control character.

What about bold, italic or code formatting in cells?

With the default Strip formatting setting, emphasis markers and code backticks are removed while the text inside survives; links become their visible label and the URL is dropped. Turn the setting off if you want the Markdown markers preserved in the CSV.

Can I convert several tables at once?

Yes. Contiguous pipe-table groups separated by blank lines or prose are treated as separate tables. Combine exports them all with a blank line between, First only exports the initial table, and Choose one lets you pick a table by number.

Which output delimiter can I choose?

Comma (RFC 4180 default), semicolon for many European Excel installations, or tab for direct spreadsheet pasting. Fields are quoted only when they contain the delimiter, a quote character or a line break; embedded quotes are doubled.

Why is a row shorter or longer than the others?

Markdown pipe tables do not require equal row widths. With Normalize ragged rows enabled, short rows are padded with empty fields and long rows are truncated to the widest row, and the output panel reports how many rows were adjusted. Turn it off to keep the original widths.

Does my Markdown leave the browser?

No. Parsing, formatting and CSV serialization all run locally in this tab. Nothing is uploaded or stored.

References & standards