How to Convert JSON to CSV or Excel (Including Nested JSON)
Turn a JSON API response into a spreadsheet — with nested objects flattened into columns like address.city and arrays handled the way you choose.
APIs return JSON, but people review data in spreadsheets. Converting JSON to CSV or Excel lets you sort, filter and share an API response, a database export or a log file with anyone. The tricky part is that JSON can be nested while a spreadsheet is flat.
How nested JSON becomes columns
Nested objects are flattened using dotted column names. This record:
{ "name": "Sara", "address": { "city": "Lahore", "zip": "54000" } }
becomes the columns name, address.city and address.zip. Arrays need a choice: join them into one cell (red; blue), split them into numbered columns (colors.0, colors.1) or keep them as JSON text.
How to convert JSON to CSV
- Open the JSON to CSV converter.
- Paste a JSON array of objects, or an API response like
{"data": [...]}— the data array inside wrapper objects is found automatically. - Choose how arrays should be handled.
- Download as CSV or Excel (XLSX).
Every key that appears in any record becomes a column, so records with missing fields simply leave those cells empty instead of breaking the table.
When the JSON is invalid
If the converter cannot read the input, validate it first with the JSON Formatter & Validator, which shows the exact position of the error — usually a missing comma, a trailing comma or single quotes instead of double quotes.
Need the opposite direction? Use CSV to JSON.
Frequently Asked Questions
Can it convert nested JSON?
Yes. Nested objects are flattened into dotted columns such as address.city, and arrays can be joined, split into columns or kept as JSON text.
What if my JSON is wrapped in an object like {"data": [...]}?
The converter finds the array of records inside the wrapper automatically.
Can I download Excel instead of CSV?
Yes. Download the result as CSV or as an XLSX workbook.
Is my JSON uploaded?
No. Conversion runs in your browser and the data never leaves your device.
