Microsoft Excel cannot open a raw .json file as a clean spreadsheet by double-clicking it. Because JSON stores hierarchical objects and arrays rather than a flat row-and-column grid, you either need Excel's built-in Power Query importer or a converter that flattens objects into an .xlsx workbook.
Want an instant spreadsheet without configuring Power Query? Use our free browser-based JSON to Excel Converter (.xlsx) to flatten nested objects, preserve leading zeros, and neutralize spreadsheet formula injection with zero server uploads.
Download Sample JSON Test Files
Free static downloads. No sign-up required.
Clean array of order objects with leading-zero ZIP codes (00501, 07030) and order IDs.
UTF-8 JSON (3 records)
Nested customer object, string array tags, leading zeros, and a phone-like +1 string.
UTF-8 JSON (nested objects & arrays)
Method 1: Open a JSON File Directly in Excel Using Power Query
Supported desktop versions of Microsoft Excel include Power Query's native JSON connector:
- Open a blank workbook in Excel and go to Data > Get Data > From File > From JSON.
- Select your
.jsonfile and click Import to launch the Power Query Editor. - If your JSON root is an array of objects, click To Table on the Transform tab, then click the double-arrow expand icon on the column header to choose fields.
- For nested objects or nested arrays, click the expand icon on each nested
RecordorListcolumn individually before clicking Close & Load.
From JSON connector (Microsoft 365 for Mac or Excel for Windows 2016+ is required). Even on supported versions, deeply nested objects require manual column-by-column expansion, and automatic type detection can strip leading zeros from ZIP codes unless you explicitly set column types to Text.Method 2: Convert JSON to .xlsx in Your Browser (DoneInTab)
If you are on macOS without Microsoft 365, need quick nested flattening, or want strict leading-zero preservation without uploading sensitive API payloads to a remote server:
- Open DoneInTab JSON to Excel Converter.
- Paste JSON text or upload a
.jsonfile (processed 100% in local browser memory). - Choose your flattening separator (default
.), array handling (JSON string or comma-joined), smart type detection, and OWASP formula escaping. - Download the generated OpenXML
.xlsxworkbook and open it in Excel, LibreOffice Calc, or Google Sheets.
How Flat Objects, Nested Objects, and Arrays Map to Excel Columns
| JSON Structure | Example Input | Resulting .xlsx Column / Cell |
|---|---|---|
| Flat object array | [{"id":"001","total":42.5}] | Columns: id (Text '001'), total (Number 42.5) |
| Nested object (flattened) | {"customer":{"zip":"00501"}} | Column: customer.zip (Text '00501') |
| Nested array (JSON mode) | {"tags":["priority","vip"]} | tags: ["priority","vip"] |
| Nested array (Join mode) | {"tags":["priority","vip"]} | tags: priority, vip |
| Single object root | {"status":"ok","count":3} | 1-row table with columns status, count |
Leading-Zero Preservation & Formula Injection Protection
- Leading Zeros Preserved: String values matching leading-zero patterns (such as
"00501"or"00081") are written as explicit OpenXMLStringcells even when Smart Types is enabled, preventing Excel from turning them into501or81. (Learn more in How to Keep Leading Zeros in CSV Files.) - Formula Injection Defense: When enabled, cells beginning with
=,+,-,@, tab, or carriage return are safely escaped with a leading apostrophe so untrusted JSON strings cannot execute formulas when opened in Excel.
Supported Formats, Limits & Related Tools
- Output Format (.xlsx only): DoneInTab generates modern OpenXML
.xlsxworkbooks. Legacy binary.xlsoutput is not supported. - Browser Bounds: Designed for client-side workbooks up to 100,000 rows and 1,000 columns (capped by available browser memory and Excel's 32,767-character cell limit).
- Going the other direction? Use Excel to JSON Converter (reads
.xlsxworksheets into flat JSON arrays of objects or arrays without nested JSON reconstruction), CSV to Excel, or CSV & Excel Standards Guide.
Troubleshooting & Frequently Asked Questions
Why does Excel show “Record” or “List” instead of my data?
In Power Query, nested objects appear as clickable Record links and arrays appear as List links until you expand them. Using DoneInTab's flattening option expands nested objects into dot-separated columns automatically.
Can I convert a JSON file to legacy .xls format?
No. DoneInTab exports modern OpenXML .xlsx files only, which are supported by Microsoft Excel (2007 and newer), Apple Numbers, Google Sheets, and LibreOffice Calc.
What if my JSON root is a single object or a primitive array?
A single root object converts into a 1-row worksheet, and an array of primitive values converts into a single value column. Top-level primitive strings or numbers alone are rejected because they have no tabular structure.