HandyBench

CSV ⇄ Markdown Table Converter

Turn CSV into Markdown tables and back.

How to use the CSV ⇄ Markdown Table Converter

  1. 1 Choose CSV → Markdown or Markdown → CSV.
  2. 2 Paste your CSV rows or Markdown table.
  3. 3 Pick the delimiter and alignment, then copy the output.

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 optionSeparator cellEffect 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.

Examples

  • ▸ Pasting a spreadsheet export into a GitHub README as a table.
  • ▸ Extracting a Markdown table back into CSV for a sheet.

Frequently asked questions

Does it handle commas inside quoted CSV fields?

Yes. The CSV parser understands standard double-quote quoting, so a value like "Doe, Jane" stays in a single cell. A quote only opens a quoted cell at the start of a cell, so an inch mark in the middle, as in 55" screen, is kept as a normal character and does not swallow the following rows.

Can I set column alignment?

Yes. Choose left, center or right and the Markdown separator row (:---, :---: or ---:) is written accordingly. The choice applies to every column; edit the separator row by hand for per-column alignment.

What happens to a pipe character inside a cell?

In CSV to Markdown it is escaped as \| so it does not split the column. Going back, Markdown to CSV reads an escaped pipe as a literal pipe in the cell and splits only on unescaped pipes, so the cell survives the round trip.

Can it handle line breaks inside a quoted CSV cell?

Yes. A quoted cell that spans several lines stays one cell. Because Markdown table rows must be one line, the line break is written as <br> in the table, and Markdown to CSV turns <br> back into a line break inside a quoted cell.

Does Markdown to CSV keep the column alignment?

No. CSV has nowhere to store alignment, so the separator row is dropped and only the cell text is written, quoted when it contains the delimiter or a quote.