JSON to CSV converter

Paste JSON or open a .json file and get a table. Nested objects are flattened into columns such as address.city. Records with different keys are lined up under the union of all keys. Arrays of arrays and JSON Lines work as well.

JSON to CSV tool

Your file stays in this browser tab. It is not uploaded by SheetShift.

JSON file

Drag a file here, or

Options

How to use the JSON to CSV

  1. Paste JSON into the box or choose a .json file.
  2. Keep flattening on to turn nested objects into columns. Turn it off to keep nested values as JSON text in one cell.
  3. Choose how arrays are handled, then press Convert.
  4. Download the CSV. It opens in Excel and Google Sheets.

Example: input and output

This example was produced by the same code the tool runs with default settings. You can download the sample file(s): users.json.

Input
[
  {"id": 1, "name": "Ana", "address": {"city": "Lisbon", "zip": "1000"}, "tags": ["admin", "beta"]},
  {"id": 2, "name": "Raj", "address": {"city": "Pune"}, "active": true}
]
Output
id,name,address.city,address.zip,tags,active
1,Ana,Lisbon,1000,admin; beta,
2,Raj,Pune,,,true

Result summary: Converted 2 records into 6 columns.

Supported formats

Input: .json, .txt, JSON Lines. Output: CSV with a comma, semicolon, tab or pipe delimiter.

Limitations

  • The input must be an array of records, one object, or an object that wraps one array of records (such as {"data": [...]}).
  • Arrays of objects inside a record are written as JSON text in one cell.
  • Keys that appear in only some records create columns that are empty for the others.

When this helps

Open API data in a spreadsheet

Copy an API response, convert it and inspect or pivot it in Excel.

Share data with non-developers

A JSON export is hard for colleagues to read. A CSV opens everywhere.

Frequently asked questions

How are nested objects handled?

They are flattened: {"address": {"city": "Lisbon"}} becomes a column named address.city. You can change the separator.

What if records have different keys?

The output has one column for every key found in any record. Missing values are left empty.

Does it accept JSON Lines?

Yes. If the text is not one valid JSON document, each non-empty line is read as a separate JSON value.

Related tools

Category: Data Conversion