CSV to JSON Converter
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.
Sample input
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
Why type conversion matters
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.
Going the other way
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.
How it works
- Paste CSV text or drop a .csv or .tsv file. The delimiter (comma, semicolon, tab or pipe) is detected; you can override it.
- Leave Header row on if the first line holds column names. Turn it off to get column1, column2 and so on.
- Choose whether to convert types and whether dot headers such as address.city become nested objects.
- Check the preview table, then copy the JSON or download it as a file.
Tips
- Spreadsheets in many European locales export with semicolons because the comma is the decimal mark. Detection handles that, but check the preview.
- Codes with leading zeros, such as ZIP codes or SKUs like 007, stay as text so the zeros are not lost.
- Long digit strings such as phone or card numbers are kept as text, because numbers beyond about 15 digits lose precision in JSON parsers.
- If a cell contains a line break, the field must be in double quotes. Excel and Sheets do this automatically on export.
Frequently asked questions
How do I convert an Excel file to JSON?
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.
How are quotes and commas inside a cell handled?
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.
How do I get nested JSON from CSV?
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":"..."}}.
Is there a size limit?
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.
More in Free Tools
- Cubic Bezier Easing Generator
- Customer Feedback Form Generator With a Question Bank
- Design Prompt Generator
- Free Digital Business Card Maker
- Free Digital Catalog Maker with a WhatsApp Order Button on Every Product
- Discount Code Generator: Unique Codes in Bulk
- Free DNS Lookup
- DNS Propagation Checker
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App