JSON to Excel Converter
Published Updated
Paste JSON or upload a .json file and download a ready-to-open Excel spreadsheet. Nested objects are flattened into columns, all in your browser.
One object per row, one key per column
The converter turns a JSON array of objects into a worksheet. Each object is a row and each key is a column, and nesting is flattened into column names. The rules are fixed, so you can predict the output before you convert.
Flattening rules, by example
| JSON input | What you get in the sheet |
|---|---|
| {"name": "Ann", "address": {"city": "Oslo", "zip": "0150"}} | Columns name, address.city, address.zip |
| "tags": ["a", "b"] | One cell containing a, b |
| "items": [{"sku": 1}, {"sku": 2}] | One cell containing the JSON text of the array |
| {"users": [{...}, {...}]} | Rows taken from the users array |
| A single object with no array | A one-row sheet |
| A bare value inside the array | A column called value |
| Two keys that flatten to the same name | The second becomes name (2) |
Limits
Excel's own limits are 1,048,576 rows, 16,384 columns and 32,767 characters per cell (Microsoft). The tool adds a stricter cell budget, because 2 million cells already takes about 12 seconds and 0.9 GB of memory in its own tests.
| Item | Limit |
|---|---|
| Input size | 50,000,000 characters |
| Rows times columns | 2,000,000 cells |
| Data rows | 1,048,575 (one row goes to headers) |
| Columns | 16,384 |
| Text in one cell | 32,767 characters, longer text is cut with a warning |
| Nesting depth | 500 levels |
| Sheet name | 31 characters, none of \ / ? * [ ] : |
What each JSON value becomes in the workbook
One record with 22 kinds of values went through the site's own code, run in Node.js 22.23.1, and the workbook was read back with openpyxl 3.1.5. The tool's own component, mounted in a browser, wrote the identical file, byte for byte (same SHA-256), in Google Chrome 157, Firefox 155 and Playwright's WebKit build (not the Safari app).
| JSON value | Cell in the .xlsx |
|---|---|
| 42, -7, 3.14 | numbers |
| 0.30000000000000004 | the number with all 17 digits; the warning counts it |
| 1e-7 and 1e21 | numbers, written as 1e-7 and 1e+21 |
| true, false | boolean cells |
| null | no cell, so the cell stays blank |
| "" (empty string) | an empty text cell |
| "2026-01-15", "2026-01-15T10:30:00Z", "01/15/2026" | text, exactly as written |
| "0150" and "12%" | text; the leading zero stays |
| 9007199254740991 | the number 9007199254740991 |
| 9007199254740993 | the number 9007199254740992 (rounded while parsing) |
| 1234567890123456789 | the number 1234567890123456800 |
| "1234567890123456789" (quoted) | text with all 19 digits |
| -0 | 0 |
| 1e400 | the error value #DIV/0! (the number is too large, so parsing gives Infinity); no warning is shown |
Formulas, control characters and the cut at 32,767
| Input | What the workbook holds |
|---|---|
| "=SUM(1,1)", "+1+1", "-1+1", "@SUM(A1)", a HYPERLINK formula and a DDE-style "=cmd|..." string | text cells with no formula element; openpyxl reads each back as a string |
| A tab or a space before the = | text, with the tab or space kept |
| A line feed inside a string | kept |
| Carriage return, U+0001 and U+0000 | written as the escape sequences _x000d_, _x0001_ and _x0000_ |
| A string of exactly 32,767 characters | kept whole |
| 32,768 characters | cut to 32,767, and the page warns about the cut |
| 32,766 characters, then an emoji | cut to 32,766, so no half emoji is left |
| Sheet names Sales/2026: Q1?, A[1]*, History and a blank name | Sales2026 Q1, A1, Sheet1 and Sheet1 |
| A 40-character sheet name; 30 letters plus an emoji | the first 31 characters; the 30 letters |
| Records {b}, {a, b}, {c, a}, {d: null} | columns b, a, c, d, in first-seen order; d stays empty |
| [[1,2],[3,4]] and [1, "x", null, true] | the text [[1,2],[3,4]] and 1, x, , true |
| An empty array or an empty object | an empty text cell |
In the browser: file names, preview and speed
The real tool component, mounted in each browser. File names, the preview and the warnings were the same in all three:
- Pasted JSON downloads as data.xlsx. A file named orders.v2.json gives orders.v2.xlsx, a file named export (no extension) gives export.xlsx, and a file named only .json gives data.xlsx.
- With 25 rows and 35 columns, the preview showed 20 rows and 30 columns and the note: Preview shows the first 20 rows and 30 columns. The download contains everything. An 80-character cell showed its first 60 characters and an ellipsis.
- Typing Sales/2026: Q1? as the sheet name shows: Excel will name it Sales2026 Q1.
- A .json file that starts with a UTF-8 byte order mark loaded (2 rows). The same text pasted with the mark was refused as invalid JSON.
- Above 5,000,000 characters the live preview is skipped. At 8,412,227 characters the page showed that message, and Convert still built the file.
| Convert, click to download link (median of 5) | Chrome 157 | Firefox 155 | the WebKit build |
|---|---|---|---|
| 20,000 rows x 10 columns (2,752,227 characters) to a 2.29 MB file | 352 ms | 441 ms | 315 ms |
| 60,000 rows x 10 columns (8,412,227 characters) to a 6.83 MB file | 1,128 ms | 1,313 ms | 1,001 ms |
Invalid JSON is reported with the browser's own parser message, so the wording differs. For two objects on separate lines (JSON Lines), Chrome 157 gave Unexpected non-whitespace character after JSON at position 8 (line 2 column 1), Firefox 155 gave JSON.parse: unexpected non-whitespace character after JSON data at line 2 column 1 of the JSON data, and the WebKit build gave JSON Parse error: Unable to parse JSON string. In all three the Convert button stayed disabled.
From JSON to .xlsx
Step 1
Paste JSON or add a .json file
A top-level array of objects works best. An object that wraps one such array is unwrapped for you.
Step 2
Name the sheet and read the preview
The preview shows the first 20 rows and 30 columns, plus warnings for long numbers or cells that will be cut.
Step 3
Convert and download
The workbook is written as .xlsx with ZIP compression on. The library's default is uncompressed, which makes files two to three times larger.
When another tool fits better
If you want plain comma-separated text, use JSON to CSV. If the JSON is a deeply nested document rather than a list of records, Excel is the wrong destination, and a flat table will hide most of its structure in JSON text cells.
What happens between the JSON text and the workbook
The text is parsed with the browser's JSON.parse. If the result is a list, each element is a row. If it is an object that holds exactly one non-empty list of objects, that list is used and the key is reported, so a typical API reply with total and data fields works. Each row is then flattened, the column names are collected as the union of all keys in order of first appearance, and cells over 32,767 characters are cut. SheetJS writes the sheet with its zip entries compressed.
JSON numbers are read as IEEE 754 double-precision values in JavaScript. RFC 8259 says that good interoperability can be achieved when software does not expect more range or precision than IEEE 754 double-precision numbers give, and JavaScript keeps integers exactly only up to Number.MAX_SAFE_INTEGER (9,007,199,254,740,991). Before parsing, the tool also scans the raw text for numbers with more than 15 significant digits and shows a warning.
Worked example: 1,000 generated records
The test file is synthetic. It holds 1,000 records of 170,380 characters: id, name, a boolean, a date string, a nested address (city, zip), a tags list of 1 to 3 plain values, an orders list holding one object, a note (one of them is the text =SUM(1,1)), a discount that exists in every fourth record, and one 19-digit number in record 6. The site's own prepareJson and buildXlsxBytes were run in Node 22, and the .xlsx was read back with SheetJS to look at the cell types.
| Item | Result |
|---|---|
| Output | 11 columns, 1,000 rows, 138,839 B (about 0.81 times the JSON text) |
| Columns, in order | id, name, active, signup, address.city, address.zip, tags, orders, note, discount, snowflake |
| Tags list | "a", "a, b" and "a, b, c" for 1, 2 and 3 tags |
| Orders list (holds an object) | One text cell: [{"sku":"X0","qty":1}] |
| Cell types read back | id: number; active: boolean; signup "2026-01-15": text; address.zip "10000": text |
| The =SUM(1,1) note | Text, not a formula |
| Discount (in 1 of 4 records) | 0.15 as a number; rows without it: empty cell |
| The 19-digit number | Stored as the number 1234567890123456800, with a warning showing the example 1234567890123456800 |
The last row is the one to watch. The digits in the JSON were 1234567890123456789 and the cell holds the rounded value. Quoted in the JSON, the same 19 digits became a text cell with every digit.
Edge cases we ran
- Two lists of objects in one wrapper object (users and orders): the tool does not choose. The whole object becomes one row with two JSON-text cells.
- Keys that collide after flattening, such as "a.b": 1 next to a: {b: 2}, get the second one renamed to "a.b (2)" rather than overwritten.
- Two JSON objects on separate lines (JSON Lines) fail with a syntax error from the parser, quoted back to you.
- 600 nested arrays are refused with a message about more than 500 levels, instead of crashing the page.
JSON to Excel, answered
How are nested objects and arrays handled?
Nested objects become dotted column names such as address.city. An array of plain values is joined into one cell with commas. An array that contains objects is written into one cell as JSON text, so nothing is dropped.
Why did a long ID change in Excel?
The browser's JSON parser keeps integers exactly only up to 9,007,199,254,740,991, and Excel keeps 15 significant digits. The tool warns when a number has more than 15 digits. Put such IDs in quotes in the JSON and they are written as text with every digit.
What if my objects have different keys?
Columns are the union of all keys, in the order they first appear. A row that lacks a key leaves that cell empty.
Does it understand JSON Lines or NDJSON?
No. A file with one object per line is not valid JSON as a whole, and the tool reports a syntax error. Wrap the lines in square brackets and separate them with commas.
Will dates become Excel dates?
No. Date strings stay as text, exactly as written. Strings that start with = or @ also stay text and are never evaluated as formulas.
How big a file can it handle?
Up to 50 million characters of input, 2 million cells (rows times columns, blanks included) and 1,048,575 data rows. Larger inputs are refused with a message asking you to split them.
What if my API reply has two lists, like users and orders?
The tool only unwraps a reply when exactly one key holds a non-empty list of objects. With two, the whole reply becomes a single row and each list is written as JSON text in its own cell. Convert the two lists separately.
Will an ID with 19 digits keep its last digits?
Not as a JSON number. In our test the number 1234567890123456789 was stored as 1234567890123456800 and the page showed a warning. Written in quotes, the same 19 digits were stored as a text cell with every digit kept.
What happens to a flattened name that already exists?
The later one gets a number: with "a.b": 1 and a: {"b": 2} in the same record, the columns were a.b and a.b (2).
Are cells that start with = written as formulas?
No. =SUM(1,1), +1+1, -1+1, @SUM(A1), a HYPERLINK formula and a DDE-style =cmd| string were all written as text cells with no formula element, and openpyxl 3.1.5 read each one back as a string.
Why does a cell show #DIV/0!?
The JSON held a number too large for a double, such as 1e400. Parsing turns it into Infinity, and the workbook gets the error value #DIV/0! in that cell, with no warning on the page. Put such values in quotes to keep them as text.
Why is my JSON refused when I paste it but accepted as a file?
One cause is an invisible byte order mark at the start of the text. Reading a file drops it, so a .json file with the mark loaded as 2 rows in Chrome 157, Firefox 155 and the WebKit build. Pasted, the mark stays in the text and the parser refuses it.
How long does a large file take?
On a generated 60,000-row, 10-column input of 8.4 million characters, the click-to-download time had a median of 1,128 ms in Chrome 157, 1,313 ms in Firefox 155 and 1,001 ms in the WebKit build, over 5 runs each. The file was 6.83 MB.