Browser-Based · Instant · Free

CSV to JSON.
Typed and Ready to Use.

Paste CSV or open a .csv file and get a JSON array: one object per row, with the header as keys. Numbers and true/false become real JSON values, and the separator is detected for you.

Convert CSV to JSON

More data converters: JSON to Excel · JSON to CSV · Excel to JSON · XML to JSON · JSON to XML · XML to Excel · YAML to JSON · JSON Formatter

How to Convert CSV to JSON

1
Paste or open the CSV

From Excel, Google Sheets, a database export or any program. Comma, semicolon, tab and pipe are detected.

2
Set the options

Header row, number detection, nested objects from dotted column names, and objects or plain arrays.

3
Copy or download

Copy the JSON into your code or download it as a .json file.

How the CSV is read

With "Detect numbers and true/false" on

In the CSVIn the JSON
12.5012.5 — a number
0019"0019" — stays text, so leading zeros in codes and postcodes are kept
true, FALSEtrue, false
nullnull
empty"" — an empty string
3,14"3,14" — decimal commas are left as text, because they cannot be told apart from a list
  • Quoted values follow the CSV standard: commas, quotes and even line breaks inside "double quotes" are read correctly.
  • Header row: its cells become the keys. Empty headers are named column_3 and repeated ones get _2, so no value is lost. Switch it off to get every row, including the first, as a plain list.
  • Dots in headers make nested objects: columns address.city and address.zip become "address": {"city": …, "zip": …} — the reverse of what JSON to CSV does.
  • Numbers with more than 15 digits such as card-like IDs stay text, because JSON readers would round them.
  • Output: Arrays gives [["id","name"],[1,"Ana"]], useful for charts and compact files.

Starting from an Excel file? Use Excel to JSON to skip the CSV step. To turn CSV into a spreadsheet, use CSV to Excel.

Frequently Asked Questions

Is my CSV uploaded?

No. The CSV is read and converted by JavaScript in your browser. It is not sent to our server or stored.

Which separators are supported?

Comma, semicolon, tab and pipe. Detect looks at the first rows and picks the one that gives the same number of columns on each row; you can also choose it yourself.

Why did my postcode keep its leading zero?

Values starting with 0, like 0019, stay text on purpose so that codes, phone numbers and postcodes are not changed. Normal numbers become JSON numbers.

Can I get nested JSON from a CSV?

Yes. Name the columns with dots, like address.city, and switch on "Dots in headers make nested objects".