01 / Objects
Headers as keys
The first row names the fields; blank headers become column1, column2 and so on.
Free tool
Drop a CSV file or paste the text and the JSON shows as you go: a list of objects with the headers as keys, JSON Lines, one object keyed by the first column, or a list of arrays. Numbers and true or false become real values, codes like 007 and long IDs stay exact, and headers like address.city become nested objects. The separator and character set are found for you.
Need a custom tool, app or website? Contact us →The JSON shows here as soon as there is CSV to read.
Converted in your browser. Your data is never uploaded or saved. Only your settings are remembered on this device.
Ready for code
01 / Objects
The first row names the fields; blank headers become column1, column2 and so on.
02 / Types
42 becomes a number, true a boolean, and an empty cell null. Turn this off to keep everything as text.
03 / Reading
Quoted cells, doubled quotes and line breaks inside quotes are handled.
Guide
A CSV to JSON converter reads a spreadsheet export and writes the same data as JSON, the format that APIs, JavaScript and most config files expect. With a header row, every row becomes an object and the header names become its keys. Without one, every row becomes an array. This converter also types the values, so 42 comes out as a number, true as a boolean and an empty cell as null.
Take the sample in the box: a header row name,city,age and three people. With headers on and typed values, the first object is:
{"name": "Ava", "city": "Boston", "age": 34}
The age has no quotes because it is a number, while the zip code 02134 keeps its quotes, so its zero is not lost. Noah's row, Noah,"Austin, TX",28, gives "city": "Austin, TX", because the quotes in the CSV keep the comma inside the value. With headers off, the same file becomes four arrays, starting with ["name", "city", "age"] and then ["Ava", "Boston", 34].
| Shape | You get | Pick it when |
|---|---|---|
| A list of objects | [{"name": "Ava", ...}, ...] | Almost always: APIs, seed data, JavaScript |
| JSON Lines | One object per line, no brackets | Logs, BigQuery and MongoDB imports, streaming tools |
| Keyed by the first column | {"Ava": {"city": "Boston", ...}} | Looking rows up by an ID or a name |
| A list of arrays | [["name", "city"], ["Ava", "Boston"]] | The file has no header row, or you want the smallest output |
With Keyed by the first column, the first column must hold unique values. If two rows share one, the later row replaces the earlier one, and the status line says how many did.
With typed values on, clean numbers become JSON numbers, true and false, or TRUE and FALSE, become booleans, and empty cells become null. A value that starts with a zero, like 02134, stays a string so the zero is kept. So does any number longer than 15 digits, because JavaScript would round it. Amounts like $12 and dates stay as strings. Files split on semicolons are read with decimal commas, so 3,50 becomes 3.5; change Numbers are written like if that guess is wrong. With typed values off, every value is a string and empty cells are "".
row["first name"] in JavaScript. Rename it to first_name if you prefer dot access.Headers with dots, like user.name and user.city, become nested objects: {"user": {"name": "Ava", "city": "Leeds"}}. Untick Dotted headers as nested objects to keep them as flat keys with dots in them.
To check or tidy the result, paste it into the JSON formatter. Need a spreadsheet instead of JSON? Use CSV to Excel.
Questions
Drop or paste the CSV and press Save the JSON. The JSON also shows in the box.
Untick The first row is headers to get an array of arrays.
Yes, unless you untick that option. Numbers with leading zeros, and numbers longer than 15 digits, stay as text so nothing is lost.
Yes. The separator is found for you, or pick it.
No. It is converted in this tab. Only your settings are remembered on this device.
Save the sheet as CSV first, then convert that. Excel to CSV does the first step in your browser.
As null when typed values are on, and as an empty string "" when they are off.
Yes. It is written with the browser's own JSON writer, so you can paste it straight into code or send it as a request body.
Yes. Set Shape to JSON Lines. The download is saved as a .jsonl file.
Yes. Name the columns with dots, like address.city, and they become nested objects.