CSV to JSON Converter

Rows-
Columns-

JSON

How the converter works

Paste CSV text and the page parses it using the standard CSV rules: fields can be wrapped in double quotes so they may contain the delimiter or line breaks, and a doubled quote inside a quoted field means one literal quote. With the header option on, the first row gives the key names and the result is an array of objects, one per data row. With it off, you get an array of arrays. The optional conversion turns values such as 34 into numbers, true and false into booleans and empty cells into null; leave it off to keep every value as a string. Excel exports often use a semicolon or tab, so change the delimiter if everything lands in one column.

Example

CSV inputJSON output
name,age,city
Ann,34,Leeds
Bo,28,"York, UK"
[{"name":"Ann","age":34,"city":"Leeds"},{"name":"Bo","age":28,"city":"York, UK"}]

FAQ

How do I convert CSV to JSON?

Paste your CSV into the box. The JSON appears below right away; click Copy JSON to copy it. Pick the right delimiter if your file uses semicolons, tabs or pipes.

Why is everything in one column?

Your file probably uses a different delimiter than a comma. Excel in many European countries saves CSV with semicolons. Choose semicolon or tab in the delimiter menu.

What if a value contains a comma?

In valid CSV such a value is wrapped in double quotes, like "York, UK", and the converter keeps it as one value. A quote inside a quoted value is written as two quotes.

Can it handle big files?

It runs in your browser, so very large files (tens of megabytes) may be slow. For normal spreadsheets with thousands of rows it is instant.

Is my data uploaded?

No. The conversion happens locally and nothing is sent or stored.

Rows with fewer cells than the header get null (or empty) for the missing keys; extra cells are named column_N.

See also: JSON to CSV converter · JSON formatter · text diff checker · remove duplicate lines · sort lines · all tools