JSON to XLSX
Turn JSON into a workbook, with nested objects flattened rather than stringified.
JSON
How this reads your output
The JSON is flattened to a table and written as a workbook. Flattening rather than stringifying is the choice worth explaining: a nested object rendered into a cell as JSON text is unusable — you cannot filter, sort or reference it — whereas dotted column names keep every value addressable and the structure reversible. Arrays of scalars are joined with semicolons for the same reason, because a column of bracketed JSON is not something anyone can work with in a spreadsheet. Records with differing keys produce the union of all columns, so nothing is silently dropped, and the type warnings apply here exactly as they do to a CSV.
What the results mean
- Dotted columns
- Nested keys become a.b.c. Addressable and reversible, unlike a stringified object.
- Joined arrays
- Scalar arrays become a semicolon list, which is filterable. Bracketed JSON in a cell is not.
- Union of keys
- Records with different fields all contribute columns. Missing values are blank rather than dropped.
- Values kept as text
- On by default, for the same reason as any other spreadsheet write.
Common problems and fixes
- My nested objects became columns with dots in the name
- That is the flattening, and it is the useful outcome. The alternative is a cell containing JSON text, which cannot be sorted or filtered.
- Some rows have blank columns
- Those records did not have that key. Blanks are used rather than dropping the column, so nothing is lost.
- Numbers turned into dates
- Turn on keeping values as text. Anything resembling a date is reinterpreted otherwise.
Frequently asked questions
How is nested JSON represented?
Flattened to dotted column names — a.b.c for a value three levels down. That keeps every value addressable, which stringifying the object into a cell does not.
What happens to arrays?
Arrays of scalars are joined with semicolons, which is filterable in a spreadsheet. Arrays of objects are flattened by index, which keeps them addressable if unwieldy.
What if records have different fields?
Every key becomes a column and records missing it get a blank. Nothing is dropped, because silently losing a field is far worse than an untidy sheet.
Put this on your own site
Free to embed, no attribution required beyond the source link the frame carries itself. It runs entirely in your visitor's browser, sets no cookies and loads no third-party script.
<iframe src="https://runthetests.com/embed/json-to-xlsx/" width="100%" height="720" style="border:1px solid #e5e5e5;border-radius:8px" title="JSON to XLSX" loading="lazy"></iframe>
Preview it at https://runthetests.com/embed/json-to-xlsx/. Embedded pages are marked noindex, so yours stays the canonical copy — not this one.