What a Markdown table needs
Tables are not part of the original Markdown specification. They come from GitHub Flavored Markdown, which defines a header row, a separator row of dashes, and body rows, each wrapped in pipe characters. The separator row also sets alignment, and this tool writes it for you.
| Alignment option | Separator cell | Effect in GitHub |
|---|---|---|
| Default | --- | Browser default, usually left |
| Left | :--- | Left-aligned |
| Center | :---: | Centred |
| Right | ---: | Right-aligned, handy for numbers |
The chosen alignment is applied to every column, because the tool has no per-column control. Edit the separator row by hand if only the price column should be right-aligned.
Worked example
This three-column input with comma delimiter and right alignment:
Name,Role,Note
"Doe, Jane",Dev,"a|b"
Bob,Ops
produces:
| Name | Role | Note |
| ---: | ---: | ---: |
| Doe, Jane | Dev | a\|b |
| Bob | Ops | |
Three things happened. The quoted comma stayed inside one cell. The pipe in the data was escaped as \| so it does not split the column. The short row was padded with an empty cell, since the column count comes from the widest row.
Direction and delimiter settings
For CSV to Markdown, the delimiter selects how the input is split: comma, tab (what you get pasting from a spreadsheet) or semicolon (common in European exports where the comma is a decimal mark). For Markdown to CSV, the same setting chooses the delimiter to write. Output cells containing the delimiter, a quote or a line break are wrapped in double quotes, and inner quotes are doubled, as in RFC 4180.
Limitations
- Quotes inside a cell. A double quote starts a quoted cell only at the very start of a cell. A quote in the middle, such as the inch mark in
55" screen, is kept as an ordinary character, so one stray quote does not swallow the rows after it. A quoted cell that is never closed gives an error. - Line breaks inside quoted fields. The whole input is parsed with its quotes, so a quoted cell that spans two lines stays one cell. Markdown table rows must be a single line, so the line break is written as
<br>in the output, which GitHub and most renderers show as a line break. Going back, Markdown to CSV turns<br>into a line break inside a quoted CSV cell. - Escaped pipes on the way back. Markdown to CSV treats
\|as a pipe inside the cell and splits only on unescaped pipes, so a cell that contained a pipe survives the round trip. - Alignment is lost when converting to CSV, because CSV has no way to store it; the separator row is simply dropped.
- The first row is always the header. Markdown tables cannot exist without one.
- Cell text is trimmed, and Markdown in cells (bold, links) is passed through unchanged.
To go to or from structured data rather than a table, use CSV to JSON or JSON to CSV.