CSV guide
How to Convert Nested JSON to CSV
CSV is a flat table, while JSON can contain objects and arrays at any depth. A useful conversion therefore needs an explicit record array and a policy for nested values.
Convert nested JSONTrace one nested record into its CSV columns
In this existing fixture, the row array is inside results. Set Array path to results, enable dot-notation flattening, and keep arrays as JSON. With comma as the CSV separator, the two input records become two data rows:
{
"results": [
{
"id": "000184",
"customer": { "name": "Ada", "region": "US" },
"tags": ["analysis", "csv"]
},
{
"id": "000219",
"customer": { "name": "Grace", "region": "UK" },
"tags": ["data", "compiler"]
}
]
}
id,customer.name,customer.region,tags
000184,Ada,US,"[""analysis"",""csv""]"
000219,Grace,UK,"[""data"",""compiler""]"customer.name and customer.region become separate columns. tags remains one JSON string cell; doubled quotes escape its JSON quotation marks inside CSV. Array items do not create extra rows. Selecting Join with commas would replace that cell with analysis, csv and lose the original array structure.
If your JSON starts with a root array or a single root object, leave Array path empty. results.items applies only when those two nested keys actually exist. A wrong path produces an error rather than selecting some other array automatically.
A literal key a.b and a nested a → b would otherwise generate the same column. The converter blocks that collision. Rename the source keys, or turn flattening off so the nested object stays JSON text. Missing keys, null and empty strings all become empty CSV cells, so retain the original JSON when those distinctions matter.
Step by step
- Identify the array that represents rows, such as results.items.
- Enter that dot-separated array path in the converter.
- Enable dot-notation flattening for nested objects such as customer.name.
- Keep nested arrays as JSON when preserving structure matters, then review the generated columns.
Check the result
- Compare the number of exported rows with the length of the selected JSON array.
- Check records where optional nested properties are missing; their cells should be empty without shifting adjacent values.
- Reparse one preserved object or array cell as JSON to confirm that quoting and escaping survived the CSV export.
Common pitfalls
- Flattening can create many sparse columns when object shapes vary widely.
- Joining array values is lossy when items contain commas or nested objects.
- An empty array contains no column evidence, so it produces an empty table.
Try the example on this page
Choose Try sample to load this guide’s synthetic data. Adjust the settings, inspect the result and export it here. You can also choose your own file for local processing.
Open a data file to start
The parser runs off the main thread. Once loaded, you can search, sort, validate, repair and export without an account.
Original samples: nested-records.json
Related CSV guides
Privacy boundary
Files selected in the workbench are processed locally. A public URL is requested directly by the browser and must permit cross-origin access. No server proxy is used by the MVP.