How to Convert JSON to Excel Without Losing Nested Data
Choose CSV for a simple table or XLSX for a styled workbook. Learn how nested objects, arrays, missing fields and string identifiers affect the spreadsheet you export.
Convert JSON to ExcelChoose CSV or a real Excel workbook
CSV is plain text with delimited cells. Excel can open it, but CSV does not store worksheet styling or explicit cell types. XLSX is a workbook format that can store typed cells, filters and formatting. They are different outputs, not different names for the same file.
Choose the Excel converter when you want a workbook with styled headers, filters and a frozen first row. Choose CSV when another application needs a simple delimited table. Renaming a .csv file to .xlsx does not create a workbook.
Find the record array
Most table exports work best with an array of objects: one object becomes one row. If an API wraps that array inside a field such as results, select the contents of results before exporting. A deeply nested document is not automatically a list of records.
The converter collects fields from every record. If Bob has a city field but Alice does not, city still becomes a column; Alice gets an empty cell in that column. No fields are dropped just because they are absent from the first record.
[
{"id":"00123","name":"Alice","address":{"city":"London"}},
{"id":"00456","name":"Bob","active":true}
]Decide how to flatten nested objects
With flattening enabled, nested object fields become columns such as address.city. A literal dot in an original key is escaped with a backslash so it cannot collide with a nested path. Turn flattening off when you want a nested object represented as JSON inside one cell.
Preview the table before downloading. Check that the columns correspond to the fields you intend to analyze, especially when source records combine several different entity types.
id,name,address.city,active
00123,Alice,London,
00456,Bob,,trueChoose how to represent arrays
A field containing several values can be kept as JSON text in a cell or joined with semicolons. The converter does not automatically explode array items into separate rows. That prevents an accidental multiplication of records when a document has more than one nested array.
Keep arrays as JSON when their structure matters or their values contain semicolons. Joined text is easier to skim but is a display format rather than a reversible representation. If each array item should be a separate row, transform that particular array explicitly before exporting.
Preserve identifiers and understand blanks
The XLSX exporter keeps JSON strings as string cells, so "00123" retains its leading zeros. Values already parsed as JSON numbers use JavaScript numeric precision. Represent long identifiers and exact decimal text as strings in the source when their exact digits must survive.
Missing values and null values become empty spreadsheet cells. If you need to distinguish them later, add an explicit status field or transform them to labeled text before conversion. Check a few representative records in the preview, not just the header row.
Export and check the workbook
Choose your flattening and array options, then download the .xlsx file. Open it in a spreadsheet application and inspect the first and last records, unusual characters, identifiers, and columns introduced by later records. Keep the source JSON for reproducibility.
For CSV, choose the delimiter required by the receiving application. Formula protection is enabled by default and prefixes risky text with an apostrophe; switch it off only when you need the exact raw text. CSV consumers may infer types differently, so use the real XLSX output when preserving string identifiers is important.
- Each object produces one row; nested arrays do not multiply rows.
- Use JSON cells when you need to retain nested array structure.
- Check fields that are missing from the first record.
- Use the workbook export for typed string cells and filters.
- Keep the source document when an export deliberately simplifies its structure.
Put the example to work
Use your own sample, check the result, and copy or download it. The tool processes your data locally in your browser.
Convert JSON to Excel