How to Convert JSON to Excel: Complete Guide


JSON (JavaScript Object Notation) is the most common data exchange format on the web. This guide covers everything you need to know about converting JSON data into Excel spreadsheets.


Why convert JSON to Excel?


JSON is great for APIs and programs, but spreadsheets are better for analysis, reporting, filtering, and sharing with non-technical colleagues. Common use cases include API response analysis, database export review, log file inspection, and data migration.


What this converter handles


**Nested objects:** Objects within objects are flattened using dot notation. A structure like user.address.city becomes a column header, making deeply nested data accessible in a flat spreadsheet.


**Arrays:** Arrays of primitives (like tags: ["a", "b", "c"]) are joined into a single cell. Arrays of objects are preserved as JSON strings.


**Heterogeneous data:** When different records have different keys, the converter creates columns for the union of all keys. Missing values appear as empty cells, not "undefined" or "null" text.


**Wrapper objects:** Many APIs return data wrapped in metadata, like {"data": [...], "total": 100}. The converter automatically detects common wrapper keys and extracts the records array.


**Large numbers:** JavaScript loses precision on integers larger than 2^53 (9,007,199,254,740,992). Discord snowflakes, Twitter IDs, and similar 64-bit integers are written as text cells to preserve every digit.


**Leading-zero strings:** Values like "007890" or "00042" stay as text cells so Excel does not strip the leading zeros.


**Formula injection safety:** Strings starting with =, +, -, or @ are prefixed with a single quote so they display as literal text. A JSON value of "=1+1" will show as =1+1 in the cell, not as the number 2.


Handling GST JSON files


The converter auto-detects Indian GST return files (GSTR-2A, 2B, and 1) by looking for the gstin field and GST section keys. When detected, it creates one Excel sheet per section (b2b, cdnr, impg, etc.), with invoice-level rows and context columns (GSTIN, period, generation date) on every row.


Tips for working with the output


  • Use Excel's "Format as Table" feature for easy filtering and sorting.
  • For large datasets, use pivot tables to summarize data by category.
  • If a column contains JSON strings (from nested arrays), you can parse them further using Power Query in Excel.
  • Use VLOOKUP or INDEX/MATCH to cross-reference data between sheets.