Data tool ยท free every day
CSV to JSON and JSON to CSV
Convert between CSV and JSON with headers, quoting, and numbers handled properly. Free every day, nothing uploaded.
The tool
How it works
- Drop a CSV, TSV, or JSON file.
- Choose whether numbers become numbers and whether the JSON is indented.
- Download and check the preview.
Your file stays on your computer
The work happens in this page, in your browser. Your file is never uploaded, stored, or seen by us. If you like, open your browser's network tab while you use the tool: nothing is sent. Details in the privacy policy.
Worked example
orders.csv with a header row and 2,000 rows.
Outputorders.json: an array of 2,000 objects keyed by the header names, with quantities as numbers.
Questions people ask
How do I convert CSV to JSON?
Drop the CSV in. The header row becomes the keys and every other row becomes an object. Numbers and true/false become real values unless you turn that off.
Is my data uploaded?
No. The conversion runs in this page, using the same code our test suite checks.
What about semicolons or tabs?
The delimiter is detected from the first few lines, so European CSVs and TSVs work without being told.
Why is my ZIP code showing as a number?
It should not be: values with a leading zero, like 02134, are deliberately kept as text. If something else is converted that you wanted left alone, turn off the numbers option.
My JSON is an object, not an array.
If it contains an array of records, that array is used. A single object becomes one row.
How are commas and quotes inside fields handled?
Properly, per RFC 4180. Quoted fields, doubled quotes, and line breaks inside a field all survive the round trip, and there are tests for exactly that.