JSON to CSV
Turn a JSON array into a spreadsheet-ready CSV.
Something went wrong
Nested values were flattened
CSV has no way to express nesting, so nested objects and arrays became dotted column
names such as address.city and tags.0. Converting back will
not automatically restore the original shape unless you enable “rebuild nested
objects” on the CSV to JSON tool.
Processed locally in your browser. Nothing you type here is sent to our servers.
What does this tool do?
This converts an array of JSON objects into CSV that a spreadsheet will open cleanly. Each object becomes a row and each property becomes a column, with the header taken from the union of all keys — so rows with different shapes still line up correctly, and a missing property becomes an empty cell rather than a shifted column.
Quoting and escaping are handled by PapaParse, so values containing commas, quotes or newlines are written correctly rather than breaking the file.
How to use it
- Paste a JSON array of objects. A single object is treated as one row.
- Choose your delimiter — comma, semicolon, tab or pipe.
- Press Convert to CSV.
- Download the file, or copy it into a spreadsheet.
How nesting is handled
This is the honest part. CSV is a flat format and JSON is not, so any conversion of nested data involves a decision. You get two:
-
Flatten to dotted columns.
{"address": {"city": "London"}}becomes a column namedaddress.city. Array items are indexed:tags.0,tags.1. This reads well in a spreadsheet, but an array of varying length produces a different number of columns per row. - Keep as JSON text. The nested value is written into the cell as a JSON string. The structure survives intact, but the cell is not something a spreadsheet can work with.
Neither is wrong; they suit different destinations. Pick the one that matches what you will do with the file.
Common use cases
- Handing API data to someone who works in Excel or Google Sheets.
- Preparing a bulk import file for a system that only accepts CSV.
- Producing a quick report from a JSON export.
- Loading data into a tool that expects tabular input.
Limitations
- The input must be an array of objects, or a single object. An array of bare values has no columns and is rejected with an explanation.
- Nesting is lossy in the ways described above.
nullis written as an empty cell, which is indistinguishable from an empty string once the file is read back. CSV has no null.- Every value becomes text. Types are recovered only by whatever reads the file, and its guesses may differ from yours.
- The output uses LF line endings. Some Windows tools prefer CRLF; most now accept both.