How to convert JSON to an Excel file
- Paste your JSON into the box.
- Press Convert to Excel. The browser downloads
output.xlsx, with the data on a sheet called Sheet1 and the column names in the first row. - Read the message under the button: it gives the number of rows and columns and lists any cell that needed attention.
The conversion runs in your browser, so the JSON is not uploaded. It accepts three shapes: an array of objects, which gives one row per object; a single object, which gives one row; and an array of other values, which go into a column named "value". A lone number or string cannot become rows and columns, and an empty array is reported too: "The JSON is an empty array, so there are no rows to export." If the text is not valid JSON, you see the parser's message with the position of the problem.
A worked example
This input, with a nested object, arrays and missing fields:
[
{
"id": 1,
"name": "Ana",
"address": { "city": "Lisbon", "zip": "1000-001" },
"tags": ["vip", "new"],
"orders": [{ "sku": "A1", "qty": 2 }],
"active": true,
"notes": null
},
{
"id": 2,
"name": "Ben",
"email": "ben@example.com",
"tags": [],
"meta": {}
}
]produces a sheet with 2 data rows and 10 columns:
| id | name | address.city | address.zip | tags | orders | active | notes | meta | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Ana | Lisbon | 1000-001 | vip, new | [{"sku":"A1","qty":2}] | TRUE | |||
| 2 | Ben | [] | ben@example.com | {} |
The nested address became two columns, address.city and address.zip. The tags were joined into one cell, the order list was kept as compact JSON, and the fields only Ben has, email and meta, were added as new columns on the right. Missing values and null leave the cell empty.
How each JSON value is written
| JSON value | Example | Cell content |
|---|---|---|
| String | {"code": "007"} | 007 |
| Number | {"price": 19.99} | 19.99 |
| true / false | {"active": true} | TRUE |
| null | {"notes": null} | (empty cell) |
| Array of plain values | {"scores": [90, 85.5, true]} | 90, 85.5, true |
| Array containing objects or arrays | {"matrix": [[1, 2], [3, 4]]} | [[1,2],[3,4]] |
| Empty array or object | {"meta": {}} | {} |
| Integer beyond 9,007,199,254,740,991 | {"id": 12345678901234567890} | 12345678901234567890 |
Numbers and true/false are written as real Excel numbers and booleans, so formulas and sorting work on them. Strings stay text even when they look like numbers or dates: "007" keeps its zeros, and an ISO date such as "2024-02-14" remains text until you convert it in Excel.
Column names and order
- Columns appear in the order their keys are first seen, reading the objects from first to last.
- Nested objects are flattened into dot paths at any depth: a → b → c becomes the column
a.b.c. - If a key already contains a dot and would print the same as a nested path, both columns are kept and the later one gets a suffix:
{"a.b": 1, "a": {"b": 2}}gives the columns a.b and a.b (2). - Keys that look like numbers, such as
"2024", keep their position. If a key is repeated inside one object, the last value is used.
Excel limits and large numbers
Excel allows at most 32,767 characters in a cell, 1,048,576 rows including the header row, and 16,384 columns. JSON with more items or more distinct keys than that is refused with an explanation. Longer text is cut to the cell limit, and the message names the cells, for example: "1 cell was longer than Excel's limit of 32,767 characters per cell and was cut to that length: A2 (40,000 characters)."
Excel stores numbers as double-precision values, which hold integers exactly only up to 9,007,199,254,740,991. Larger IDs, such as many 64-bit database keys, would silently change. The converter writes them as text with every digit and tells you: "1 number is too large to store exactly as an Excel number, so it was written as text with every digit kept: A2 (12345678901234567890)." Excel also documents a number precision of 15 digits, so if a column holds 16-digit IDs, keep them as strings in the JSON.
Common pitfalls
- Joined arrays lose detail.
[1, 2]and["1", "2"]both become 1, 2, and["a, b", "c"]becomes a, b, c, which cannot be split back reliably. Use an array of objects when each item needs its own cell. - JSON Lines. A file with one object per line is not a single JSON value and is rejected. Put the lines inside
[ ]and separate them with commas. - Mixed arrays. In
[{"name": "Ana"}, "loose", 5], the object fills thenamecolumn and the other items go into a "value" column on their own rows.
Frequently asked questions
Can I name the file or the sheet?
Not in the tool. The file is always output.xlsx with one sheet called Sheet1; rename them after downloading.
Will formulas in strings be calculated?
No. A string such as "=SUM(A1:A3)" is written as text, not as a formula.
Can I convert several JSON files into one workbook?
Each conversion produces one sheet. Combine the arrays into a single array first if the objects share the same fields.
How do I turn the spreadsheet back into JSON?
Use the Excel to JSON converter. Keys will be the column names, so flattened columns such as address.city come back as keys with a dot, not as nested objects.