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.
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
Plan,Seats,Price
Free,1,$0
Team,10,$12| Plan | Seats | Price |
| --- | --- | --- |
| Free | 1 | $0 |
| Team | 10 | $12 |Semicolons, decimal commas and a quoted field
Produkt;Preis;Lager
Kaffee;4,50;12
"Tee; grün";3,20;0| Produkt | Preis | Lager |
| --- | --- | --- |
| Kaffee | 4,50 | 12 |
| Tee; grün | 3,20 | 0 |Tab-separated cells copied from a spreadsheet
Name Email
Ana [email protected]
Li | 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?
| Input | What you get |
|---|---|
| Pipe | inside a cell | Escaped as \| so the column count stays right |
| Empty cell (a,,c) | Empty table cell |
| Short rows | Padded with empty cells to match the widest row |
| Blank lines, or rows that are all empty | Skipped |
| Line break inside a quoted cell | Kept as a real line break, which breaks the table row. Replace it with <br> or a space first |
| Spaces around values | Trimmed, including spaces inside quotes |
| Windows line endings (CRLF) | Handled; the \r is dropped |
| Accents, CJK and emoji | Passed through unchanged |
| Numbers and currency | Copied as text exactly as written. All columns are left-aligned |
| Very wide tables | Every column is kept. They may scroll sideways on GitHub |
| Only one line | A header and separator with no body rows |
How does this compare with Pandoc and csvlook?
| MDConvert (this page) | Pandoc | csvkit csvlook | |
|---|---|---|---|
| Install needed | No, runs in the browser | Yes, command-line program | Yes, Python package (pip install csvkit) |
| Command | Paste or upload | pandoc data.csv -f csv -t gfm | csvlook data.csv |
| Delimiter | Comma, semicolon or tab, detected from line 1 | Comma for -f csv | Sniffed, or set with -d |
| Batch / scripting | No, one table at a time | Yes | Yes |
| Your data leaves your machine | No | No | No |
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.