JSON to Excel: the complete guide
How the .xlsx format actually works, why cell types change how your data behaves, and where the practical limits are.
What is a .xlsx file, really?
An .xlsx workbook is a ZIP archive containing XML parts. When you unzip one, you find something like this:
[Content_Types].xml describes what each part is
_rels/.rels links the package to the workbook
xl/workbook.xml lists the sheets and their names
xl/_rels/workbook.xml.rels links the workbook to its parts
xl/styles.xml fonts, fills, borders, number formats
xl/worksheets/sheet1.xml the actual cell data
That is the whole idea behind Office Open XML, the format Microsoft introduced with Excel 2007 and which every modern spreadsheet application now reads. Because it is XML rather than a proprietary binary blob, files are smaller, diffable, and — importantly — straightforward to generate.
HopConvert writes these parts directly in JavaScript, in your browser, and packages them with a small ZIP writer. There is no library download, no server round trip, and no file ever leaving your machine.
Why cell types matter more than you would expect
A CSV file is typeless. Every value is a string, and your spreadsheet application has to guess what each one means. When it guesses wrong, you get the classic problems:
| Value | In a CSV | In an .xlsx |
|---|---|---|
249.50 | Text — sorts as "249.50" between "2" and "30" | Number — sorts and sums correctly |
true | Text — never matches a TRUE filter | Boolean — filters and pivots correctly |
007 | Text, but Excel may auto-convert it to 7 | Text — stays exactly as written |
1e3 | Text | Number — 1000 |
| Long text | Text | Text |
HopConvert writes each cell with the type it actually has in the JSON: numbers as numeric cells, booleans as boolean cells, and everything else as inline strings. That is why the workbook you download sorts correctly straight away.
JSON to Excel or JSON to CSV?
Use the workbook when a person will open the file and work with it. Use CSV when a machine will read it.
- Workbook (
.xlsx): types, formatting, column widths, frozen headers. Bigger files, but this is what you send to a human. - CSV: tiny, universal, trivially streamed. This is what you load into Postgres, BigQuery, or a pipeline — and what the JSON to CSV converter is for.
A practical rule: if the next step is a spreadsheet, use the workbook. If the next step is a database or a script, use CSV.
How is the column set decided?
Every record is read, and the column list is the union of all keys, in order of first appearance. Records missing a key get an empty cell. The result always has the same number of columns, which is what a worksheet needs.
Each column is also auto-sized: the width is measured from the header and the longest value in that column, then clamped between 10 and 46 characters. This stops numeric columns from showing as ####### and stops text columns from being padded out to an arbitrary width.
How is nested data handled?
A worksheet is flat, so nested objects are flattened into column names joined by __ — {"user": {"name": "Alice"}} becomes the column user__name. Arrays of objects expand into one row per element with the parent fields repeated, which is exactly the header/detail layout pivot tables expect.
If you need genuine nesting, Excel supports it natively through JSON-typed columns in modern versions — but that is a manual step. For automatic conversion, flattening is the practical choice.
What are the practical limits?
Because the workbook is built in memory in your browser, the ceiling is your tab's available memory rather than a server limit. In practice:
- Up to about 50,000 rows — instant, and the file stays a sensible size.
- 100,000 to 500,000 rows — works, but expect a few seconds and a noticeably larger file.
- Beyond that — use CSV, which streams and compresses far better, or split the data.
There is no enforced limit and no upload, so nothing fails with a "file too large" error. The browser simply runs out of room first, and you get a clear message instead of a broken download.
Common edge cases
- Top-level object instead of an array: becomes a one-row sheet.
- Top-level array of scalars: becomes a single column named
value. - Empty strings and nulls: written as empty cells, so Excel shows them as blank rather than the word "null".
- Unicode, emoji, and RTL text: written as UTF-8 and render correctly.
- Values containing newlines: preserved inside the cell, because XML escaping handles them properly.
- Sheet name restrictions: Excel forbids
\ / ? * [ ] :and caps names at 31 characters. HopConvert sanitises the name for you. - Numbers beyond 2^53-1: JSON.parse loses precision on very large integers. Keep 64-bit IDs as strings in the source JSON.
The same job, the way you need it
Free tools for the specific version of this conversion you are actually doing.
JSON to CSV for Excel
Need a plain .csv instead of a workbook? Here are the encoding and delimiter details that matter.
Frequently asked questions
Everything you need to know about turning JSON into a real Excel workbook.
What is a JSON to Excel converter?
How does the .xlsx format work?
Why do cell types matter?
Is HopConvert free?
Is my JSON uploaded?
How large a file can it handle?
How are nested objects handled?
__, so {"user": {"name": "Alice"}} becomes the column user__name. Arrays of objects expand into one row per element.When should I use CSV instead?
Try the JSON to Excel converter
Free, instant, and private — your JSON never leaves this tab.
More free tools: JSON to CSV · CSV to JSON · XML to CSV · JSON to YAML · YAML to JSON · JSONL to CSV · JSON to SQL · JSON to Markdown · JSON to Excel