JSON to CSV
Turn a JSON array of objects into a CSV file you can open in Excel, Google Sheets or LibreOffice.
or drop a file here · .json, .txt · up to 50 MB
About JSON to CSV
APIs and databases export records as JSON, but spreadsheets expect rows and columns. This converter takes a JSON array of objects and writes one CSV row per object, with a header row built from the keys. Nested objects can be spread out into their own columns, so the result opens cleanly in Excel, Google Sheets or LibreOffice.
It is useful for analysts who receive JSON exports, developers handing data to non-technical colleagues, and anyone who needs to sort, filter or chart records that only exist as JSON.
When to use it
- You exported orders or users from a web service and want to filter them in a spreadsheet.
- A colleague asked for a CSV and you only have an API response.
- You need a semicolon-separated file for a spreadsheet set to a locale that uses commas as decimal marks.
- You are importing records into a tool that only accepts CSV.
Worked example
Input, with the default options (comma, flatten on, formula protection on):
[
{"id": 1, "name": "Asha", "address": {"city": "Pune", "pin": "411001"}, "note": "=SUM(A1:A9)"},
{"id": 2, "name": "Ben, Jr.", "address": {"city": "Leeds"}, "tags": ["x", "y"], "note": "-5"}
]
Output, reported as 2 rows × 6 columns:
id,name,address.city,address.pin,note,tags
1,Asha,Pune,411001,'=SUM(A1:A9),
2,"Ben, Jr.",Leeds,,-5,"[""x"",""y""]"
The formula gets an apostrophe in front, while the plain number -5 is left alone. Ben, Jr. is quoted because it contains the delimiter.
Good to know
- Columns are the union of all keys, in the order they first appear. A missing value or
nullbecomes an empty cell. - Arrays are written as JSON text in a single cell. With flattening off, nested objects are too.
- An array of arrays is also accepted. Each inner array becomes a row, with no header added.
- A single object is converted to one row.
- Delimiters: comma, semicolon, tab or pipe. Lines end with CRLF, as RFC 4180 describes.
- Files up to 50 MB can be opened. To go the other way, use CSV to JSON.
How to use JSON to CSV
- Paste JSON or open a .json file.
- Choose the delimiter and options.
- Select Convert to CSV, then copy or download.
Privacy: how it works
Your data is converted in your browser and never uploaded.
Frequently asked questions
What happens to nested objects?
With flattening on, {"user": {"name": "A"}} becomes a column called user.name. Arrays are written as JSON text in one cell.
What is formula-injection protection?
Cells that start with =, +, - or @ can run as formulas when opened in a spreadsheet. The tool adds an apostrophe in front of such text so it is shown, not executed. Plain negative numbers are not changed.
Why does the download open correctly in Excel?
The file starts with a UTF-8 byte-order mark, which tells Excel to read accented letters and other scripts correctly.