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.

Output shapes you can choose
ShapeExampleGood 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

  1. Paste CSV text or drop a .csv or .tsv file. The delimiter (comma, semicolon, tab or pipe) is detected; you can override it.
  2. Leave Header row on if the first line holds column names. Turn it off to get column1, column2 and so on.
  3. Choose whether to convert types and whether dot headers such as address.city become nested objects.
  4. Check the preview table, then copy the JSON or download it as a file.

Tips

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

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.

Product

Who It's For

Features

Resources

Company

View Sitemap