How to Convert JSON to Excel (Array to Workbook)

Turn a JSON array of objects into an Excel workbook: object keys become the header row, each object a row. Done in the browser, with no upload.

Updated 5 min read By CodingEagles
Free tool JSON to Excel Converter Turn a JSON array of objects into an XLSX workbook. Open tool

An API gave you JSON and someone wants it in a spreadsheet. This guide shows how to turn a JSON array of objects into a real Excel workbook, what happens when objects do not all match, and how nested data is handled.

The short version: paste your JSON array, check the column mapping, and download an .xlsx. The JSON to Excel converter does it on your device, so the data never leaves your browser.

The JSON shape that maps cleanly to a sheet

The natural fit for a spreadsheet is an array of flat objects, exactly what most REST APIs return:

[
  { "name": "Apples", "quantity": 12, "price": 3.50 },
  { "name": "Pears", "quantity": 8, "price": 2.25 }
]

Each object is a row. The keys (name, quantity, price) become the header row. The result is a tidy table:

namequantityprice
Apples123.5
Pears82.25

Because JSON carries types, numbers come through as numbers and booleans as booleans, so the spreadsheet is ready to sort and total without any cleanup.

What happens when objects do not match

Real API data is rarely uniform. Some records have fields others lack. A converter handles this by gathering the union of all keys across the array and using that as the header row. Any object missing a particular key just leaves that cell blank.

So this:

[
  { "name": "Apples", "price": 3.5 },
  { "name": "Pears", "price": 2.25, "organic": true }
]

produces a sheet with three columns (name, price, organic), where the first row’s organic cell is empty. Nothing is dropped, and the columns line up. This is far safer than keying off only the first object, which would silently lose every field that object happened not to have.

Nested data is the one thing to watch

A spreadsheet is two-dimensional: rows and columns. JSON is not; it nests. When an object value is itself an object or an array, there is no clean cell to put it in, so it is written as readable text rather than being lost.

If your JSON is deeply nested, you will get better results by flattening it to one level of keys before converting. For example, reshape {"user": {"name": "Sam"}} into {"user_name": "Sam"} in code first. The flatter the JSON, the cleaner the spreadsheet.

How to convert JSON to a workbook

Step 1: Add your JSON

Paste an array of objects into the converter, or drop in a .json file.

Step 2: Check the columns

The header row and row count are shown so you can confirm the mapping looks right before downloading. If the JSON is malformed, you get a clear message pointing at the problem rather than a broken file.

Step 3: Download the workbook

Download a real .xlsx, ready for Excel, Numbers or Google Sheets.

Common mistakes to avoid

  • Feeding it a single object instead of an array. The converter expects [ {...}, {...} ]. Wrap a lone object in an array, or it has only one row to work with.
  • Expecting nested objects to spread into columns. Flatten nested JSON first for a clean table.
  • Pasting JSON with a trailing comma. That is invalid JSON and will not parse. Most “almost JSON” errors are a stray comma or a missing bracket.

Need the reverse, pulling a sheet out as JSON for your code? See how to convert Excel to JSON.

Frequently asked questions

What JSON shape does the converter expect?
An array of objects, like the output of most APIs: [{"name": "...", "qty": 3}, ...]. Each object becomes a row, and the keys across your objects become the column headers, so the spreadsheet lines up the way you would expect.
What if my objects have different keys?
The converter collects every key that appears anywhere in the array and uses the full set as the header row. Rows missing a particular key simply leave that cell blank, so no data is dropped and the columns stay aligned.
Can it handle nested objects or arrays?
Spreadsheets are flat, so a nested value is written in a readable text form rather than spread across columns. For the cleanest result, flatten deeply nested JSON to a single level of keys before converting.
Will numbers stay as numbers in the spreadsheet?
Yes. JSON numbers and booleans are written as typed cells, so you can sum, sort and filter them in Excel immediately rather than getting text that only looks numeric.
Is my data uploaded anywhere?
No. Parsing the JSON and building the workbook both happen on your device. Nothing is uploaded or stored.

Ready to try it?

Turn a JSON array of objects into an XLSX workbook. Free, in-browser, and 100% private — your data never leaves your device.

Open the JSON to Excel Converter