To turn CSV into JSON, treat the first row as keys and each following row as one object, so name,price then Mug,12 becomes [{"name":"Mug","price":12}]. Paste or drop a CSV file below. The converter detects the delimiter, keeps quoted commas intact, converts numbers and booleans, and can nest columns named like address.city.
| Shape | Example | Good for |
|---|---|---|
| Array of objects | [{"id":1,"name":"Mug"}] | APIs, most code |
| Keyed object | {"1":{"id":1,"name":"Mug"}} | Lookups by ID |
| Array of arrays | [["id","name"],[1,"Mug"]] | Charts, compact files |
Updated
Paste CSV, drop a file exported from Excel, Google Sheets or a database, and check the parsed rows in a preview table before copying or downloading the JSON. Nothing is uploaded.
id,name,price,in_stock,dimensions.width,dimensions.height,sku
1,"Mug, large",12.5,true,9,11,007
2,Poster,24,false,50,70,0142
3,"Tote ""canvas"" bag",18,true,38,42,0099
CSV has no types: every cell is text. If you load it straight into JSON, a price of 12 becomes the string "12", and code that adds prices together will join strings instead of summing numbers. Converting types on the way in saves fixing it in every place the data is used.
The converter only changes values that are clearly numbers, true, false or null. Anything ambiguous, such as a code with a leading zero or a long ID, stays text. If you need everything as strings, untick Convert types.
For JSON back to a spreadsheet, the JSON to CSV converter flattens nested objects into dot columns, the reverse of the nested option here. Round-tripping through both keeps the structure.
In Excel, choose File, Save As and pick CSV UTF-8. In Google Sheets, choose File, Download, Comma-separated values. Then drop the file here. Each sheet needs its own export, since CSV holds one table.
The parser follows RFC 4180, the common CSV format: a field wrapped in double quotes can contain commas and line breaks, and two double quotes in a row stand for one literal quote. A value like "Mug, large" stays one field.
Name the columns with dots, such as id, address.street and address.city, and tick Nested keys. Each dot makes a level, so the row becomes {"id":1,"address":{"street":"...","city":"..."}}.
Only your device's memory. Files of a few megabytes convert instantly. For files in the hundreds of megabytes, a command-line tool or a streaming parser is a better fit.
Related: JSON to CSV converter, JSON formatter, HTML table generator, YAML to JSON converter, XML to JSON converter.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.