How to Convert JSON to CSV for Excel and Google Sheets
JSON is how apps, APIs and exports hand over data: orders from a shop, contacts from a CRM, results from a form. It’s great for programs, but hard to read, sort or total. A spreadsheet is much better for that, and the easiest way to get JSON into Excel or Google Sheets is to convert it to CSV: plain text with one row per line and the values separated by commas.
This guide shows how to do it with the free JSON to CSV converter, what happens to nested objects and arrays, and how to avoid the problems people most often run into.
What the conversion does
JSON to CSV works best with a list of similar records, an array of objects. Each object becomes a row and each field becomes a column:
[
{ "id": 1, "name": "Ada", "city": "London" },
{ "id": 2, "name": "Grace", "city": "New York" }
]id,name,city
1,Ada,London
2,Grace,New YorkThe column names come from the field names, in the order they first appear. If some records are missing a field, their cell is simply left empty. A single object (not in a list) becomes one row.
How to convert JSON to CSV, step by step
- Open JSON to CSV and paste your JSON into JSON input, click Open file, or drop a .json file onto the box. Sample loads an example.
- Check the options: Separator, Arrays inside records, Flatten nested objects, Header row and Protect against spreadsheet formulas. The defaults suit most files; each is explained below.
- Click Convert to CSV. The result shows how many rows and columns it has.
- Click Download and open the file in Excel, Google Sheets, Numbers or LibreOffice, or click Copy and paste it.
If the JSON has a mistake, such as a missing comma or quote, the converter points to the exact line and column. See how to format and validate JSON for the most common errors.
Nested objects and arrays
Real JSON is rarely flat. Take a customer with an address and a list of tags:
{ "id": 1, "address": { "city": "London", "zip": "N1" }, "tags": ["vip", "new"] }With Flatten nested objects on (the default), each field inside the address gets its own column, named with a dot: address.city, address.zip. Arrays are kept as JSON text in one cell:
id,address.city,address.zip,tags
1,London,N1,"[""vip"",""new""]"Choose Separate columns (tags.0, tags.1) under Arrays inside records to give each item its own column instead:
id,address.city,address.zip,tags.0,tags.1
1,London,N1,vip,newSeparate columns are easier to filter in a spreadsheet; one cell keeps the table narrow when lists are long or of different lengths.
Excel tips
Everything ends up in one column
Excel uses the list separator of your computer’s region. In many European countries, such as Germany, France and Spain, that’s a semicolon, because the comma is used for decimals. If Excel puts everything into column A, convert again with the separator set to Semicolon ( ; ). Google Sheets detects the separator itself.
Accents and special characters
The downloaded file is marked as UTF-8, so names like “José” or “Müller” show correctly when Excel opens it with a double-click.
Formula protection
A cell that starts with =, +, - or @ can be run as a formula when the file is opened, which is a known way to hide harmful content in a CSV. Protect against spreadsheet formulas (on by default) puts an apostrophe in front of such text so it stays plain text. Leave it on unless the data comes from you and you need those values exactly.
Leading zeros
Spreadsheets often turn values like 00123 into the number 123. In Excel, use Data › From Text/CSV and set that column’s type to Text to keep the zeros.
More JSON and data tools
- JSON Formatter: make JSON readable and find errors.
- JSON to YAML and JSON to XML: convert to other formats.
- XML to CSV: the same idea for XML files.
Is my JSON uploaded?
No. The conversion runs in your browser, so your data never leaves your device. Our server only records that one conversion happened, for the daily limit.
Frequently asked questions
What kind of JSON works best?
An array of objects with similar fields, like a list of orders or contacts. Other shapes work too, but give less useful tables.
Can I convert CSV back to JSON?
Not with this tool yet. It converts from JSON to CSV only.
Why are some cells empty?
Those records don’t have that field. Every field found in any record becomes a column, and missing values are left blank.