Skip to content

JSON to CSV Converter

Turn a .json file into a CSV table. Nested objects become columns, you check the preview, then download a file that opens in Excel or Google Sheets.

Updated

Choose a .json file or drop it here.json · up to 50 MB · opened on your device, not uploaded

How to convert JSON to CSV

  1. Select Choose a .json file, or drop the file onto the box. Try a sample file loads a small product list so you can see the result first.
  2. Look at the preview. Row 1 holds the column names taken from the JSON keys, and every record sits on its own row.
  3. Select Download CSV (.csv). The file is saved with the same name as your JSON file and a .csv extension.

What JSON the converter accepts

A CSV is a flat table, so the converter needs a list of records.

JSON shape Result
An array of objects: [{...}, {...}] One row per object
An object holding an array: {"data": [{...}, {...}]} The first array of objects found is used as the rows
A single object: {"id": 1, "name": "Lamp"} One row
An array of plain values: [1, 2, 3] One column named value

Metadata that sits next to the array, such as a page number or a total count, is left out when the array is used.

How nested data is flattened

Take one record from the sample file:

{
  "id": 1,
  "name": "Desk lamp",
  "price": 24,
  "stock": { "warehouse": "East", "units": 120 },
  "tags": ["lighting", "office"]
}

It becomes this row:

id name price stock.warehouse stock.units tags
1 Desk lamp 24 East 120 lighting, office

The rules:

  • Nested objects are opened up, and the path to each value becomes the column name, joined with dots.
  • Arrays of simple values are joined with a comma and a space in one cell.
  • Arrays of objects stay as JSON text in one cell.
  • Columns appear in the order the keys are first seen. If a later record has a key the earlier ones lacked, a new column is added at the right.
  • Missing keys and null values leave an empty cell.

JSON and CSV compared

JSON CSV
Structure Nested, any depth Flat rows and columns
Data types Text, number, true/false, null Text only
Each record Can have different keys Has the same columns
Read by Programs and APIs Spreadsheets, databases, people
File size Larger, keys repeat in every record Smaller, keys appear once

Converting to CSV is the usual way to get API output, a database export or a log file into a spreadsheet where it can be sorted and filtered.

Convert JSON to CSV in Excel

Excel can read JSON through Power Query:

  1. Go to Data > Get Data > From File > From JSON and pick the file.
  2. In the Power Query Editor, select To Table if the data appears as a list.
  3. Select the expand icon in the column header, choose the fields you want, and select OK. Repeat for nested columns.
  4. Select Close & Load to place the table on a sheet.
  5. Choose File > Save As and pick CSV UTF-8 (Comma delimited).

Google Sheets has no menu command for importing a JSON file, so converting to CSV first and using File > Import is the practical route there.

Things that go wrong

  • “This is not valid JSON.” The message includes what the parser objected to. Common causes are a trailing comma, single quotes around keys, comments, or a file that was cut off.
  • One JSON object per line. Files in JSON Lines format (.jsonl or .ndjson) are not one valid JSON document. Wrap the lines in square brackets with commas between them.
  • A cell holds a block of JSON. That record contains an array of objects. Convert that inner array separately if you need it as rows.
  • Long ID numbers end in zeros in Excel. Excel keeps 15 significant digits. This happens when the CSV is opened, so import the column as text with Data > From Text/CSV.
  • Dates stay as text such as 2026-03-02T10:00:00Z. JSON has no date type, so the text is passed through as written.
  • The wrong list was picked. When an object holds several arrays, the first array of objects is used. Save the one you want as its own file.

Limits

  • Files up to 50 MB.
  • One table per file. Deeply nested lists are kept as text and are never expanded into extra rows.
  • The preview shows the first 200 rows and 40 columns. The download contains everything.
  • Need a workbook instead of plain text? Use JSON to Excel. To go the other way, see Excel to JSON.

Questions

How do I convert JSON to CSV?

Choose the .json file above, check the table in the preview, and select Download CSV (.csv). Each object in the JSON becomes one row and each key becomes a column.

What happens to nested objects?

They are flattened. A key inside another object gets a dotted column name, so {"stock": {"units": 120}} becomes a column called stock.units. This works to any depth.

What happens to arrays inside a record?

An array of plain values, such as tags, is joined into one cell with commas. An array of objects is kept as JSON text in a single cell, because it has no single place in a flat table.

Why does the tool say there is no list of records?

The file holds a single value, such as a number or a line of text, and a table needs a list. The JSON should be an array of objects, or an object that contains one, for example {"data": [ ... ]}.

Is my JSON sent to a server?

No. The file is parsed and converted by code in your browser. That matters for API exports, which often contain customer data or keys.

Will the CSV open correctly in Excel?

Yes. The file is UTF-8 with a byte order mark, which tells Excel to read accented letters and non-Latin text correctly. Values that contain commas or quotes are wrapped in double quotes.

Related