CSV to Markdown Table Converter

Paste CSV or upload a .csv file and copy a Markdown table. Comma, semicolon and tab separators are detected for you.

Input — CSV
Output — Markdown Table
Markdown table will appear here...

To convert CSV to a Markdown table, paste the CSV into the box above (or upload the .csv file) and copy the table that appears. The first row becomes the header, a | --- | separator row is added under it, and every other row becomes a table row. Commas, semicolons and tabs are detected for you.

What does the output look like?

A plain comma-separated export

CSV in
Plan,Seats,Price
Free,1,$0
Team,10,$12
Markdown table out
| Plan | Seats | Price |
| --- | --- | --- |
| Free | 1 | $0 |
| Team | 10 | $12 |

Semicolons, decimal commas and a quoted field

CSV in
Produkt;Preis;Lager
Kaffee;4,50;12
"Tee; grün";3,20;0
Markdown table out
| Produkt | Preis | Lager |
| --- | --- | --- |
| Kaffee | 4,50 | 12 |
| Tee; grün | 3,20 | 0 |

Tab-separated cells copied from a spreadsheet

CSV in
Name	Email
Ana	[email protected]
Li	
Markdown table out
| Name | Email |
| --- | --- |
| Ana | [email protected] |
| Li |  |

How does it decide between comma, semicolon and tab?

It counts tabs, semicolons and commas on the first line only. Tabs win if there are at least as many tabs as either of the others. Semicolons win if there are more semicolons than commas. Otherwise it uses commas.

That is why European exports such as Kaffee;4,50;12 work: the header line has two semicolons and no commas, so 4,50 stays one cell. There is no manual override, so if your header line is unusual (for example a quoted header full of commas in a semicolon file), edit that line first.

What happens to commas and quotes inside a cell?

A field wrapped in double quotes is read as one cell, so "Austin, TX" stays in one column. A doubled quote inside a quoted field ("") becomes a single ", as the CSV standard (RFC 4180) says. The outer quotes are removed in the Markdown.

What if a cell contains a pipe character?

Pipes are escaped as \|, so a cell like a|b does not split into two columns. GitHub, GitLab and other GFM renderers show it as a plain |.

Can I paste straight from Excel or Google Sheets?

Yes. Copying a range of cells puts tab-separated text on the clipboard, and tabs are detected. For a whole .xlsx workbook, use Excel to Markdown instead, which reads the file directly.

How are pipes, empty cells, line breaks and other edge cases handled?

InputWhat you get
Pipe | inside a cellEscaped as \| so the column count stays right
Empty cell (a,,c)Empty table cell
Short rowsPadded with empty cells to match the widest row
Blank lines, or rows that are all emptySkipped
Line break inside a quoted cellKept as a real line break, which breaks the table row. Replace it with <br> or a space first
Spaces around valuesTrimmed, including spaces inside quotes
Windows line endings (CRLF)Handled; the \r is dropped
Accents, CJK and emojiPassed through unchanged
Numbers and currencyCopied as text exactly as written. All columns are left-aligned
Very wide tablesEvery column is kept. They may scroll sideways on GitHub
Only one lineA header and separator with no body rows

How does this compare with Pandoc and csvlook?

MDConvert (this page)Pandoccsvkit csvlook
Install neededNo, runs in the browserYes, command-line programYes, Python package (pip install csvkit)
CommandPaste or uploadpandoc data.csv -f csv -t gfmcsvlook data.csv
DelimiterComma, semicolon or tab, detected from line 1Comma for -f csvSniffed, or set with -d
Batch / scriptingNo, one table at a timeYesYes
Your data leaves your machineNoNoNo

For many files or a build step, Pandoc or csvlook is the better choice. This page is for the quick one-off table.

Maintained by Ankit Aglawe. Last updated .

Related Tools

Need a different format? See every tool on the Markdown converter page, or go back to the MDConvert home page.

CSV to Markdown questions

How do I turn a .csv file into a Markdown table?
Click Upload above and pick the .csv file, or open it in a text editor and paste the contents. The table appears on the right straight away. Copy it, or download it as a .md file.
Is the first row always the header?
Yes. Markdown tables need a header row, so the first non-empty line becomes the header. If your file has no header, add one line of column names at the top before converting.
Can I set column alignment?
Not here. Every column gets a plain --- separator, which renders left-aligned. To right-align a column of numbers, change its --- to ---: by hand, or build the table in the Table Generator.
Will the columns line up in the raw Markdown?
No. Cells are not padded with spaces, so the source looks ragged. That does not matter once it is rendered. If you want aligned source, run the output through the Markdown Formatter.
Where does the table render?
The output is GitHub Flavored Markdown table syntax. It renders on GitHub, GitLab, Obsidian and most static site generators.
Is my CSV uploaded anywhere?
No. Parsing happens in your browser tab. The file is never sent to a server, so it is safe to use with customer lists or internal numbers.