Runs in your browser

CSV to JSON

Convert CSV or Excel data into JSON objects, arrays, nested JSON or JSON Lines.

Part of the File Converter bot
Processed in your browser
1

CSV or Excel data

2

JSON options

Shape
Values
Empty cells
Indent
3

JSON

About the CSV to JSON Converter

This CSV to JSON converter turns CSV or Excel data into JSON in the shape you need: an array of objects, an array of arrays, nested objects from dotted headers like address.city, or JSON Lines. Numbers and true/false values can be detected automatically.

How to use the CSV to JSON Converter

  1. Drop a CSV or Excel file, or paste cells from a spreadsheet. The first row becomes the JSON keys.
  2. Pick the shape you need and how numbers, true/false and empty cells should be written.
  3. Copy the JSON or download it as a .json file.

The shape your code expects

Array of objects suits most APIs and JavaScript. Nested objects turns headers like address.city into real nested objects. Object keyed by the first column gives quick lookups by ID, and JSON Lines suits logs, BigQuery and streaming tools.

Real numbers, not strings

With value detection on, "1200" becomes 1200 and "TRUE" becomes true. Codes with leading zeros such as "007" stay as text, so nothing is lost.

Questions

Is my data uploaded?

No. The JSON is generated in your browser, on your device.

Can I convert Excel to JSON?

Yes. Open an .xlsx file and pick the sheet. Each row becomes a JSON object.

What happens with repeated column names?

They are made unique, for example Phone and Phone (2), so no value is overwritten.

How do I go back from JSON to CSV?

Use the JSON to CSV tool, which flattens nested JSON into columns.

Also searched as: excel to json · convert csv to json online · csv to json array · xlsx to json · csv to nested json · csv to json lines