QuickTools
developer tools

CSV to Markdown Table Converter

Why use this converter

Pasting a spreadsheet export into a Markdown README or wiki page by hand is tedious, and a naive "split on comma" script breaks the moment a cell contains a comma, a quote, or a line break of its own — which real-world CSV exports do constantly. This tool parses CSV properly, handling those cases correctly, and outputs a ready-to-paste GitHub-Flavored Markdown table.

Markdown table
Markdown table appears here.

What "handling it correctly" actually means

Most competing tools treat CSV as "split every line on commas," which silently corrupts any row where a field itself contains a comma, a quote, or a newline — exactly the fields most likely to hold real content like names, addresses, or descriptions. This tool parses character by character and tracks quote state, so:

  • A comma inside a quoted field doesn't create an extra column.
  • A doubled quote ("") inside a quoted field becomes a single literal ", not a broken field boundary.
  • A line break inside a quoted field stays part of that cell's content instead of splitting into a new row.

Worked example: quoted fields with embedded commas and quotes

Input:

name,role,notes
"Doe, Jane",Engineer,"Handles ""special"" projects"
Lee,Designer

Output:

| name | role | notes |
| --- | --- | --- |
| Doe, Jane | Engineer | Handles "special" projects |
| Lee | Designer |  |

Notice three things: the comma inside "Doe, Jane" didn't split into two columns, the doubled quotes around special came out as single quotes, and the last row — which only has two fields in the source CSV — was padded with an empty third cell instead of producing a malformed table.

Worked example: a line break inside a quoted cell

Input:

id,description
1,"Line one
Line two"
2,Simple

Output:

| id | description |
| --- | --- |
| 1 | Line one<br>Line two |
| 2 | Simple |

The embedded newline inside the quoted field became a <br> rather than breaking the row early, since a raw newline inside a Markdown table cell would otherwise end the row prematurely.

Edge cases this tool handles correctly

  • Empty input. Clearing the box produces an empty result with no error.
  • Ragged rows. Rows with fewer columns than the widest row in your data are padded with empty cells; rows with more columns widen the header to match, so the output table is always structurally valid.
  • Pipe characters in your data. Since | is the Markdown table delimiter, any literal pipe in a cell is escaped to \| automatically instead of breaking the table layout.
  • Stray blank lines. A blank line in the CSV (common at the end of a spreadsheet export) is dropped rather than turned into a row of empty cells.
  • No header row. Toggling off "First row is header" treats every line as data and generates generic column headers, since Markdown tables require a header row structurally even if your source data doesn't have one.
  • Non-comma delimiters. Semicolon-, tab-, and pipe-delimited exports (common from regional Excel settings) convert correctly via the delimiter selector, including quoted-field handling for whichever delimiter is selected.

When to use each delimiter option

Use comma for standard US-locale CSV exports (the default and most common). Use semicolon for CSVs from locales where Excel uses a comma as the decimal separator, which pushes the field delimiter to a semicolon instead. Use tab for TSV exports, which are common when copying a range directly out of a spreadsheet. Use pipe for data that's already partially pipe-delimited, such as exports from some database tools.

Frequently asked questions

Does this handle a comma inside a quoted field, like a name written "Doe, Jane"?
Yes. The parser tracks quote state character by character, so a comma (or whatever delimiter you've selected) inside a quoted field is treated as literal text, not a column break. Many simple converters just split on every delimiter and get this wrong.
What happens to a line break inside a quoted CSV cell, like a multi-line spreadsheet export?
It's preserved as part of that field's content while parsing, then converted to a <br> tag in the Markdown output. Markdown table cells can't contain a literal line break — a real newline would end the table row — so <br> is the standard way to represent one inside a cell, and it renders as a line break wherever the Markdown is displayed.
Does this tool handle escaped quotes, like "Handles ""special"" projects"?
Yes — a doubled quote ("") inside a quoted field is the standard CSV escape for a literal quote character, and it's unescaped correctly to a single " in the output rather than being treated as the end of the field.
Can I convert a CSV that uses semicolons or tabs instead of commas?
Yes — pick Semicolon, Tab, or Pipe from the Delimiter dropdown before pasting your data. This matters for CSVs exported from regions where Excel defaults to semicolon-separated values because the comma is already used as a decimal separator.
What happens if some rows have fewer or more columns than the header row?
Short rows are padded with empty cells out to the width of the widest row found anywhere in your data, rather than being left ragged (which would produce a broken Markdown table). If a data row has more columns than your header, the header itself is padded too, so every row in the output lines up.
Does a pipe character in my actual data break the Markdown table?
No — since | is the Markdown table column separator, any literal pipe character in your CSV data is automatically escaped to \| in the output so it displays as a normal character instead of creating a phantom column.
My CSV doesn't have a header row — can I still convert it?
Yes — turn off "First row is header" and every row in your input is treated as data. Markdown tables require a header row structurally, so generic labels (Column 1, Column 2, ...) are generated automatically to keep the output valid.
Is my CSV data uploaded anywhere?
No. Parsing and conversion both happen entirely in your browser using JavaScript — nothing you paste is sent to a server, which matters if you're converting data with names, emails, or other non-public information.

Related tools