Skip to content
ToolZone

JSON to CSV

Convert a JSON array of objects into flat CSV data, using the object keys as column headers, useful for exporting API data into a spreadsheet.

Runs in your browser. Nothing you enter or upload leaves your device.

JSON
Delimiter

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the JSON to CSV

JSON to CSV flattens a list of JSON objects into a comma-separated table you can open in Excel, Google Sheets, or any data tool. The keys of the first object become the header row, and each object becomes one line.

How it works

The input is parsed as JSON. A single object becomes one row, and if it wraps an array of records (like {"data": [...]} from an API) that array is used. The columns are every key found across all objects, in the order they first appear. Nested objects are flattened into columns such as address.city, and arrays are written as JSON text.

Values that contain the delimiter, a double quote or a line break are wrapped in double quotes with inner quotes doubled, following RFC 4180. Rows end with CRLF line breaks, and the Excel-friendly option adds a UTF-8 byte order mark so accented characters open correctly in Excel.

How to use

  1. 1

    Paste a JSON array of objects, or open a .json file.

  2. 2

    Choose the delimiter and whether to flatten nested objects.

  3. 3

    Check the table preview and the row and column count.

  4. 4

    Copy the CSV or download data.csv.

Worked examples

Mixed records

Two users with slightly different fields.

Input
[{"name":"Alice","city":"Paris, FR","age":30},{"name":"Bob","age":25,"email":"b@x.com"}]
Result
name,city,age Alice,"Paris, FR",30 Bob,,25

Columns come from the first object only, so Bob's email is dropped and his missing city is an empty cell.

Single object

An object with an array and a null.

Input
{"id":1,"tags":["a","b"],"note":null}
Result
id,tags,note 1,"a,b",
Limitations
Arrays inside records are written as JSON text, not expanded into rows. The preview shows the first 100 rows; the download includes all of them. Very large files are processed in memory and may be slow.
Assumptions
Input is an array of flat objects or a single flat object.
Privacy
The conversion happens in your browser; your JSON is not uploaded.

Frequently asked questions

What happens if my JSON objects have different fields?+

Every key from every object becomes a column. Objects missing a field get an empty cell.

Can it handle nested JSON objects?+

Yes. Nested objects are flattened into dot-notation columns such as address.city, or kept as JSON text if you turn flattening off.

How are commas and quotes inside values handled?+

The value is wrapped in double quotes and inner double quotes are doubled, so spreadsheets read it as one cell.

Can I choose a semicolon or tab delimiter?+

Yes. Choose comma, semicolon, tab or pipe.

Related tools