Convert JSON to CSV for Excel
Paste a JSON array of objects and get CSV with a header row and flattened nested fields — ready to open in Excel or Google Sheets.
Open the tool, then paste the sample input below. Everything runs locally in your browser.
The problem
An API returned JSON but a stakeholder wants a spreadsheet. JSON does not open in Excel, and nested objects do not map cleanly to columns. Converting to CSV with flattened keys and a header row gives you a file that opens and sorts like any other sheet.
Sample input
[
{ "id": 1, "name": "Ada", "address": { "city": "London" } },
{ "id": 2, "name": "Ben", "address": { "city": "Paris" } }
]
Expected output
id,name,address.city
1,Ada,London
2,Ben,Paris
The nested address.city is flattened into a dotted column header, and the first object's keys define the column order.
How to do it
- Paste the JSON array of objects.
- Confirm how nested fields are flattened.
- Convert to CSV.
- Copy or download the CSV.
- Open it in Excel or Google Sheets.
Common mistakes
- Passing a single object instead of an array of objects.
- Objects with different keys, leaving ragged columns.
- Nested arrays that do not flatten into a single cell cleanly.
- Commas inside values not being quoted for Excel.
- Expecting Excel to detect UTF-8 without a byte-order mark.
Related tools
Related guides
FAQ
How do I convert JSON to CSV for Excel?
Paste a JSON array of objects and convert. The keys become a header row, each object becomes a row, and the CSV opens directly in Excel or Google Sheets.
How are nested objects handled?
Nested fields are flattened into dotted column headers such as address.city, so each leaf value gets its own column.
What if objects have different keys?
The column set is the union of keys; objects missing a key get an empty cell, so the columns stay aligned.
Will values with commas break the CSV?
No. Values containing commas, quotes, or newlines are quoted so spreadsheets parse them as a single cell.
Is my JSON uploaded?
No. Conversion runs locally in your browser. Your data is not sent to a server.
JSON to CSV conversion runs locally in your browser. Nothing is uploaded.
Convert JSON to CSV, inspect data, build SQL and compare files — grouped in one place.
Practical example and expected result
Paste a JSON array of objects and get CSV with a header row and flattened nested fields - ready to open in Excel or Google Sheets. In practice, this is most useful when you need a quick, repeatable check on a JSON payload before adding it to a ticket, pull request, test fixture, or support note.
A realistic input for this workflow is [ { "id": 1, "name": "Ada", "address": { "city": "London" } }, { "id": 2, "name": "Ben", "address": { "city": "Paris" } } ]. The expected result should resemble id,name,address.city 1,Ada,London 2,Ben,Paris, with the same important values preserved.
Troubleshooting checklist
- Confirm you copied the complete JSON payload and not only a partial line or truncated preview.
- Run the local tool once with a safe sample, then repeat with the real data only if your team policy allows it.
- Check quoting, escaping, whitespace, encoding, timestamps, and environment-specific values before trusting the result.
- Before sharing output, remove secrets, tokens, cookies, customer data, and production hostnames that are not needed for the review.
Next useful steps
- Open this example in JSON to CSV → for a related validation or follow-up step.
- Format the JSON first for a related validation or follow-up step.
- Inspect the CSV for a related validation or follow-up step.
- Use Magic Box when you are not sure which tool should handle the next artifact.