How Nested JSON Becomes a Spreadsheet
A spreadsheet is a flat grid, and JSON isn't. Take one record with a nested customer and two orders:
{
"id": 101,
"customer": { "name": "Ana Ruiz" },
"orders": [
{ "sku": "TEA-01", "qty": 2 },
{ "sku": "MUG-04", "qty": 1 }
]
}
Nested objects become columns
Each field inside customer gets its own column, named by its path: Customer.Name. Objects inside objects keep extending the name (Customer.Address.City), so there's no depth limit.
Lists: one row per item
Each order gets its own row, and the customer's fields repeat on every row. This is the layout for pivot tables, filters, and totals like "units per SKU".
| Id | Customer.Name | Orders.Sku | Orders.Qty |
|---|---|---|---|
| 101 | Ana Ruiz | TEA-01 | 2 |
| 101 | Ana Ruiz | MUG-04 | 1 |
Lists: numbered columns
Or keep one row per customer, with a set of columns for each order. It reads well for short, fixed lists, but 40 orders with 5 fields each would mean 200 columns.
| Id | Customer.Name | Orders.0.Sku | Orders.0.Qty | Orders.1.Sku | Orders.1.Qty |
|---|---|---|---|---|---|
| 101 | Ana Ruiz | TEA-01 | 2 | MUG-04 | 1 |
Which layout should I use?
- One row per item when you'll sort, filter, chart, or total the list's contents: orders, line items, events, log entries.
- Numbered columns when every record has the same few items and you want one row per record: two phone numbers, three price tiers.
- Not sure? Leave it to the converter. It picks rows when any list has more than three items, tells you what it did, and you can switch with one click.
Lists of plain values, like "tags": ["billing", "priority"], always become one comma-separated cell. If a record has several lists, the longest becomes rows and the others stay as numbered columns, so rows never multiply.
Need the data to stay up to date?
Keep a Google Sheet live from a JSON URL with a free IMPORTJSON script, or call the same conversion from your own code with the developer API.
Questions
How do I flatten nested JSON into a spreadsheet?
Paste or drop the JSON above, or try the example, and the table appears instantly. Nested objects become dot-notation columns, and lists of objects become one row per item or numbered columns, whichever you choose. Then download Excel, copy it into Google Sheets, or download CSV: you get exactly the rows shown.
What happens to arrays inside my JSON?
Arrays of plain values become one comma-separated cell. Arrays of objects become one row per item (with the parent's fields repeated) or numbered columns like Orders.0.Sku. With more than three items in a list, rows are picked automatically.
Can I convert nested JSON to CSV or Google Sheets?
Yes, right here: after the table appears, choose Copy for Google Sheets or Download CSV. Both are built in your browser with the same layout you picked. JSON to Google Sheets also shows how to keep a sheet live from a JSON URL.
Is there a limit to how deeply nested the JSON can be?
No depth limit: customer.address.city becomes Customer.Address.City. When rows are used, only the longest list is split into rows. Other lists, and lists inside lists, stay as numbered columns.
Is my JSON stored?
No. The table, Google Sheets copy, and CSV are built in your browser. Download Excel sends the flattened rows to our converter only to build the .xlsx file, which is returned to you. The converter doesn't save your data. Need it inside your own app? The developer API does the same conversion.
API responses often come wrapped in extra layers; see our guide to converting API data to Excel. Working with JSON Lines? Read what NDJSON is.