---
title: "How to convert JSON to CSV | ToolSugar"
description: "Turn a JSON array of objects into CSV for a spreadsheet, and see what happens to missing keys and nested values."
canonical: https://toolsugar.com/blog/how-to-convert-json-to-csv
image: https://toolsugar.com/og.png
---

# How to convert JSON to CSV for a spreadsheet

Updated 2026-11-09

To convert JSON to CSV, you need an array of objects, where each object becomes one row. JSON to CSV on ToolSugar builds the table in your browser. Paste the array, pick a delimiter, and the CSV appears beside it, ready to open in Excel or any spreadsheet.

[Open JSON to CSV](https://toolsugar.com/tools/json-to-csv)

## Convert JSON to CSV in four steps

The input must be a top level array. Each item in it must be an object.

1. Paste a JSON array of objects into the box, or open a .json file.
2. Pick a Delimiter: comma, semicolon, tab or pipe.
3. Check the CSV on the right, and read the note if nested values were written as JSON.
4. Copy the CSV, or press Download to save data.csv.

## What shape of JSON works

CSV is a table, so the tool wants rows. A valid input looks like \[{"a": 1}, {"a": 2}\]. A single object, an array of numbers or an array of arrays is rejected with a message that says what was wrong.

If you have one object, wrap it in square brackets to make a one row table.

## How the header row is built

The header lists every key found in any object, in the order each key first appears. If one object lacks a key, its cell in that column stays empty, so records with different fields still line up.

A cell is wrapped in quotes when it holds the delimiter, a quote or a line break. That keeps a name like "Smith, Jo" in one column.

## Nested objects and arrays in a cell

The tool does not flatten nested data into extra columns. An object or array inside a record is written into its cell as compact JSON text, and a note under the result tells you when that happened.

If you want one column per nested field, flatten the JSON first so the values you need sit at the top level of each record.

## Questions

### Which delimiter opens correctly in Excel?

It depends on your regional settings. Many European installations expect a semicolon, while others expect a comma. If everything lands in one column, convert again with the other delimiter.

### Can I convert a JSON file I downloaded from an API?

Yes, as long as the top level is an array of objects. Open the file with the open a file option, or paste its content.

### Do the columns keep the order of my keys?

Yes, with one exception. A key that is a plain whole number, such as "2", moves ahead of the other keys in its object, because JavaScript orders object keys that way. Otherwise columns follow the order in which each key is first seen while the tool reads the array from the top.

[Open JSON to CSV](https://toolsugar.com/tools/json-to-csv)

## Related guides

- [How to convert CSV to JSON](https://toolsugar.com/blog/how-to-convert-csv-to-json)
- [How to format JSON online](https://toolsugar.com/blog/how-to-format-json)
- [How to convert JSON to YAML](https://toolsugar.com/blog/how-to-convert-json-to-yaml)
- [How to convert XML to JSON](https://toolsugar.com/blog/how-to-convert-xml-to-json)
