Convert JSON to CSV
Convert JSON to CSV for Excel, Google Sheets and Numbers. Drop a .json file and get a clean, quoted CSV with one row per object. Nothing is uploaded.
What is JSON?
JSON is the data format most of the web uses. APIs, databases and apps export it as nested objects and arrays. Programs read it well. In a spreadsheet it is hard to read.
Why convert JSON to CSV?
A CSV opens in Excel, Google Sheets and Numbers as rows and columns. Once your data is a CSV, you can sort it, filter it and work with it without writing code.
How to convert JSON to CSV
The converter looks at the shape of your JSON and turns it into rows and columns:
- An array of objects, the usual API or database export, becomes one row per object. The keys of the first object become the header row, in the same order.
- An object whose values are all arrays of plain values, such as {"name": [...], "age": [...]}, is read column by column. Each key becomes a column and each array position becomes a row.
- Any other single object becomes one row.
- Array items that aren't objects, such as plain strings or numbers, go into one column named value.
Nested objects and arrays
CSV is flat, so an object or array inside a value can't spread across columns. The converter doesn't guess a layout. It writes each nested value into its cell as compact JSON. An address object becomes {"city":"Oslo","zip":"0150"} and a tags array becomes ["new","sale"]. Nothing is lost, and you can parse the value back later. If you need separate columns such as address.city, flatten those fields in your JSON first. Missing keys and null give empty cells. True and false are written as text.
Keep every column
The header row comes from the first object. Keys that only show up in later objects don't get their own column. If your records differ, make sure the first object lists every field. Use null for the fields it doesn't have.
Delimiters, quoting and RFC 4180
The output follows the CSV rules in RFC 4180. Fields are separated by commas and rows end with CRLF line breaks. A value is wrapped in double quotes if it has a comma, a double quote, a line break, or spaces at the start or end. Quotes inside a value are doubled (""). Other values are written without quotes to keep the file small. Text is saved as UTF-8.
Opening the CSV in Excel
Google Sheets and Numbers open the file correctly as it is. The CSV is UTF-8 without a byte-order mark. Some versions of Excel assume an older encoding when you double-click such a file, which breaks accented letters and emoji. Excel set to a language that uses a comma for decimals also expects semicolons, and puts each whole row in one column. Importing the file fixes both problems, or skip the CSV and turn it into a real workbook with CSV to Excel:
- In Excel, open the Data tab and choose From Text/CSV.
- Select the downloaded .csv file.
- Set File Origin to 65001: Unicode (UTF-8) and Delimiter to Comma.
- Click Load to put the data in a sheet.
Before you start
Input: JSON. Output: CSV. The settings appear before anything runs, so you can check them first. Your original file is never changed.
A valid file can still hold the wrong data. Before you import the result, check the row count, field names, text encoding, dates, IDs and a few unusual rows.
Keep the original until you have opened and checked the result. The work happens in this browser tab, so the size you can handle depends on your device's memory, your browser and the file itself.
Steps to convert JSON to CSV
- Drop a .json file into the box above.
- The structure is detected for you. There are no options to set.
- Press Convert to build the CSV.
- Download the CSV.
Last updated · How we build and check tools · Report an error