Types, carefully
With Detect numbers and booleans on, 42 and 9.5 become numbers, true and false booleans, and empty cells null. Values that look numeric but aren't quantities stay text: 02139 (a leading zero would be lost), +44 20 7946 0000 and 1,5. Integers with more than 15 digits, such as account or order IDs, also stay text, because JavaScript and many other JSON readers can't hold them exactly. Turn detection off to keep every value as text.
How to use the CSV to JSON
- Paste CSV, or cells copied from a spreadsheet, or press Sample.
- Check the detected delimiter and whether the first row is a header.
- Choose whether to detect types and nest dotted columns such as address.city.
- Copy or download the JSON.
Examples
Types detected, ZIP codes kept
id,name,zip,active,score
1,Ada,02139,true,9.5
2,"Hopper, Grace",,false,
[
{
"id": 1,
"name": "Ada",
"zip": "02139",
"active": true,
"score": 9.5
},
{
"id": 2,
"name": "Hopper, Grace",
"zip": null,
"active": false,
"score": null
}
]
02139 keeps its leading zero, and the quoted name keeps its comma.
Semicolons and decimal commas
sku;price;stock
BK-12;19,90;3
PN-03;4,50;0
[
{
"sku": "BK-12",
"price": "19,90",
"stock": 3
},
{
"sku": "PN-03",
"price": "4,50",
"stock": 0
}
]
The semicolon delimiter is detected. Prices written with a decimal comma stay text, so their value isn't guessed.
Dotted columns as nested objects
id,address.city,address.zip
1,London,N1 9GU
[
{
"id": 1,
"address": {
"city": "London",
"zip": "N1 9GU"
}
}
]
Pasting from Excel or Google Sheets
Copying cells from a spreadsheet gives tab-separated text: paste it here and the tab delimiter is detected. Files from Excel in many European locales use semicolons, which are detected too.
Options
- Delimiter
- Detect (the default), or comma, semicolon, tab or pipe.
- First row is the header
- Use the first row for property names. Turn off to get column1, column2 and so on.
- Detect numbers and booleans
- Type values as described above; turn off to keep every value as text.
- Nest dotted columns
- Turn columns such as address.city into nested objects.
- Each row as
- An object with named properties (the default) or an array of values.
Limitations
- Dates stay text; JSON has no date type.
- Inputs up to 10 MB. Excel files (.xlsx) must be saved as CSV first, or their cells copied and pasted.
Frequently asked questions
Is my data uploaded?
No. The conversion runs in your browser; nothing you paste is sent anywhere.
Why is a number in quotes?
Because converting it would change it: a leading zero, a plus sign, a decimal comma, or more than 15 digits. Turn off type detection if you want all values as text.
My CSV has a comma inside a value. Is that a problem?
Not if the value is quoted, as in "Hopper, Grace", which is how spreadsheets export it. Unquoted, the comma starts a new field and the row gets an extra column.
How do I convert JSON to CSV?
Use the JSON to CSV converter.