Guide · CSV → Markdown

CSV to a Markdown table

Nothing inside a CSV declares its own rules. Which character splits the columns, how quotes behave, whether the first line is a header — all of it is convention, and several are in circulation. A table that comes out wrong is nearly always a file read against the wrong set.

This covers how the delimiter is picked, what quoting does, and how to get numbers to line up on the right.

Open the converter

Which character splits the columns

Four characters turn up in real files: comma, semicolon, tab, pipe. Semicolons more often than people expect — anywhere 1,50 means one and a half, the comma is already spoken for, so spreadsheets reach for the semicolon instead.

Detection is automatic, and when the answer isn't a comma the output says which character it used. That line is worth reading — a file with something unusual in its first rows, like a title line above the header, can be read wrong, and this is how you'd notice.

If it guessed wrong, set the delimiter by hand. Comma, semicolon, tab and pipe are all selectable.

  1. 01Drop the file, or paste the rows straight into the box.
  2. 02Check the note above the output for a detected delimiter that isn't a comma.
  3. 03If the table came out as one column when it should be six, pick the delimiter yourself.

When a cell contains the separator itself

A field wrapped in double quotes can contain the delimiter, and a doubled quote inside it means one literal quote character. That's RFC 4180 and it's handled properly — this is the whole reason the file isn't just split on commas.

Newlines hide inside quotes too, and that collides with the output format: a pipe table row must occupy exactly one line. So a break inside a cell is rewritten as <br>, which keeps both lines of a two-line address without splitting the row in half.

Pipe characters in cell text are escaped as \|. Without that, one pipe in a note field turns a five-column row into a six-column one.

CSV
name,note
Bolt,"M6 | 40mm
steel"
Markdown
| name | note |
| --- | --- |
| Bolt | M6 \| 40mm<br>steel |

The alignment row

The row of hyphens under the header can carry colons, and they set how a column is aligned when the table is rendered. Left, centre, right — right being the one you want for numbers.

One thing to know: the setting applies to the whole table, not per column. There's no per-column control here, because a CSV carries no information about which columns hold numbers, and guessing from the values would get it wrong on postcodes, phone numbers and version strings.

So for a table of mostly numbers, set right and fix the one text column by hand afterwards. For anything mixed, leave it on default — a plain row of hyphens, which every renderer treats as left.

Align: right
Item,Cost
Bolt,0.40
Markdown
| Item | Cost |
| ---: | ---: |
| Bolt | 0.40 |

Header rows, and files that don't have one

The first row becomes the header by default. Turn that off and every row becomes a body row — but the header row itself doesn't disappear, it comes out empty.

That looks odd and it isn't a bug: a Markdown pipe table is required to have a header row. A table without one wouldn't parse as a table at all, so an empty header is the only way to express "no header" while still producing something that renders.

Fill it in with column names afterwards, or leave it — an empty header row renders as a thin blank strip above the data.

Header row: none
Bolt,12
Nut,12
Markdown
|  |  |
| --- | --- |
| Bolt | 12 |
| Nut | 12 |

Ragged rows and malformed files

Rows with different column counts are padded out to the widest row, and the output tells you which counts it saw. That message is usually a sign something upstream is broken — a row with three cells in a six-column file normally means an unescaped quote swallowed a delimiter.

Empty lines are dropped, including lines that are nothing but delimiters, which is what a trailing block of ",,," usually is.

Values are never type-converted. 007 stays 007 and 1-2 doesn't become a date. Excel does that to you; this doesn't, because changing the value is changing your data.

A byte-order mark at the start of the file is stripped, so the first column header doesn't come out with an invisible character stuck to it.

What "large" means here

Two ceilings. 25 MB of text, and 100,000 cells — that's rows times columns, so a six-column file gets you to roughly 16,000 rows and a hundred-column file stops near a thousand.

The cell limit is the one you'll hit, and it's about rendering rather than parsing. The preview builds DOM nodes for every cell, and a few hundred thousand of them will lock up the tab. Refusing is better than freezing.

For something genuinely bigger, split it by rows and convert each piece — repeat the header row in each one.

Drop the CSV or paste the rows, switch the alignment if the figures belong on the right, then copy the table. Parsing happens in this tab, so a customer export stays on your disk.

CSV → MD