Skip to content
toolgrid

No tool found. Try another word.

CSV to JSON Converter

Convert CSV to JSON: an array of objects with the column names as keys, or an array of arrays. Numbers and true/false become real JSON types.

Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.

How to use the CSV to JSON Converter

  1. 1 Paste the CSV or open the file.
  2. 2 Choose objects or arrays, and whether to convert numbers and empty values.
  3. 3 Copy or download the JSON.

About the CSV to JSON Converter

The converter turns every row of a CSV file into a JSON object with the column names as keys, the shape most APIs, JavaScript code and NoSQL databases expect. Choose "arrays" for a compact array of arrays with the header row first.

With type detection, whole numbers and decimals become JSON numbers, true and false become booleans and empty values become null. Values with leading zeros, such as postcodes (007), and very long numbers stay strings, so nothing is lost.

Empty column names become column_1 and so on, and duplicate names get a suffix (id, id_2), so no value is overwritten. Values in quotes with commas or line breaks inside are read correctly.

Frequently asked questions

Why is 007 still a string?

Numbers with leading zeros are kept as text, because converting them would remove the zeros. The same goes for numbers with more than 15 digits.

What happens without a header row?

Turn off the header option: the keys become Column 1, Column 2 and so on, or choose the arrays format.

Can empty values be empty strings instead of null?

Yes, turn off "Empty values as null".

How do I convert JSON back to CSV?

Use the JSON to CSV converter.