Skip to content

CSV to JSON Converter

Turn spreadsheet data (CSV) into JSON, SQL inserts or a Markdown table.

  • Free, no account
  • Nothing uploaded
  • 13 tools
Input
Output
working…in 132 B · 4 linesProcessed in this tab, no request made

Nothing you paste is uploaded. The server sends connect-src 'self', so your browser blocks this page from contacting any other host. Check it yourself

Convert CSV to a JSON array, SQL INSERT statements or a Markdown table. The delimiter is detected, quoted fields are respected and leading zeros are kept.

What the converter does with your CSV

The first line names the columns and every following line becomes one object. The delimiter is detected from the first line (comma, semicolon, tab or pipe) unless you set it. Quoted cells may contain the delimiter, doubled quotes and line breaks.

sku,description,qty,zip
BOLT-M6-20,"Bolt, M6 x 20 mm",200,02134

[ { "sku": "BOLT-M6-20", "description": "Bolt, M6 x 20 mm", "qty": 200, "zip": "02134" } ]

Note qty and zip: a cell is typed as a number only when writing the number back gives the same text. 200 qualifies; 02134 does not, so the leading zero survives.

SQL and Markdown output

SQL writes one INSERT per row for the table name you give, with empty cells as NULL and quotes doubled. Identifiers use backticks. Markdown writes a pipe table you can paste into a README or an issue.

The JSON result can go straight to the formatter or to TypeScript interfaces through "Send to".

Questions

Short answers to what people ask most.

How is the delimiter chosen?

With "Auto", the first line is split by comma, semicolon, tab and pipe, and the one that yields the most fields wins. Pick the delimiter by hand if the first line is unusual.

Why are some numbers kept as text?

A cell becomes a JSON number only if writing the number back gives the same text. So 42 and -3.5 are numbers, while 007, 1e5, 0x1F and +5 stay strings. This keeps ZIP codes, phone numbers and product codes intact. Turn off "Infer types" to keep every cell as text.

Which SQL dialect do the INSERT statements use?

Identifiers are quoted with backticks (MySQL and MariaDB style) and a quote inside text is doubled. For PostgreSQL or SQL Server, replace the backticks with double quotes or brackets. Empty cells and the word NULL become NULL.

Does it handle line breaks inside a cell?

Yes, when the cell is wrapped in double quotes, as RFC 4180 specifies. A double quote inside a quoted cell is written as two double quotes.