CSV · JSON · GFM

Markdown table generator

Paste CSV, TSV or a JSON array and get a GitHub-flavoured table with escaped pipes and aligned columns — or go back the other way.

0 characters

Conversion runs in the tab. Spreadsheet excerpts often contain customer data, and it never leaves the page.

Short answer: paste the data, pick the format, copy the table. Values are escaped so a pipe or a line break cannot break the grid, and a ragged row is an error with a row number rather than a silently shifted column.

Why the parser matters

Splitting on commas looks fine until a field is "Smith, J" or contains a newline, at which point the table is quietly wrong. This page reuses the RFC 4180 parser from the CSV converter: quoted fields, doubled quotes inside quotes, and line breaks inside quotes all behave, and an unterminated quote is reported instead of merging the rest of the file into one cell.

Reading the output

The first row is the header, the second is the alignment row, and everything after that is data. The padding is cosmetic, but it keeps the raw Markdown readable in a diff — which is the whole reason to generate the table instead of typing it.

Need the same data as JSON for a script? Use the CSV converter. If the numbers came out of a subnet calculation, theCIDR calculator is where they came from.

Markdown table questions

How are pipes inside a value handled?

They are escaped as \| and newlines become <br>, because a raw pipe ends a cell and a raw newline ends the row. Quoted CSV fields are read by the same RFC 4180 parser the CSV converter uses, so a value like "Smith, J" arrives intact instead of being split.

Do the columns have to line up in the source?

No. GFM ignores extra spaces, so the padding this tool adds is only for reading the file later. It does require every row to have the same number of cells — a ragged row is reported with its number rather than padded silently, because a shifted column is a data bug.

What does the alignment row do?

The second row (|---|:--:|) controls alignment in the rendered table. Left is the default; centre and right change presentation only, never the values. When converting Markdown back to CSV the alignment row is skipped, not treated as data.

Can it read a table with a header I did not write?

Yes. Paste the whole table, including the alignment row, and choose Markdown → CSV. If the second row is not an alignment row the converter stops and says so, because without it the input is just text with pipes in it.

Related tools