JSON to Excel Converter — Export JSON as .xlsx Files

Analysts and product managers receive JSON from APIs all day, and finance rarely wants to read a .json attachment. When someone hands you a JSON payload and the request is a spreadsheet, this page turns that payload into a real .xlsx file with a bold header row, numeric cells for numbers, and one column per nested key. The workbook is assembled in this browser tab with JSZip, so the file is built locally and saved straight to your downloads. Paste JSON or load a file, set the options, press Convert, then download the sheet.

Preset examples
Nested customer objects flatten into customer.name and customer.city columns; tags stay a JSON array cell.
Preview and stats update as you type.

The reader runs on this device, so a local file is copied into the box without going anywhere.

How the converter works

The input is parsed once as JSON. A top-level array becomes one row per element, and a single object becomes one row. Before a cell is written, every record is turned into a key-value map, and the headers are the union of those keys in the order they first appear. Flattening walks nested objects and joins each path with a dot, so a record that misses a later key still lines up under the same header and leaves that cell blank.

Arrays stay inside their cell instead of expanding into extra rows. json mode writes the array as compact JSON text, while join mode converts each item to text and concatenates it with the separator from the join field, which suits tag lists and short codes. The numbers option decides whether a JSON number becomes a numeric cell or stays as text, and that is the setting to switch off when a value such as an identifier carries leading zeros.

The workbook is assembled in memory as an Open Packaging Conventions zip with six parts: content types, package relationships, the workbook, workbook relationships, a styles file, and the worksheet. Text is written as inline strings, the header row points at the bold style index, and numeric cells carry a bare value node so totals work right after the file opens. JSZip compresses the package with DEFLATE and hands the bytes to the download button. Nothing here uploads the payload, so the size ceiling is your machine rather than a server.

Before and after: nested JSON becomes a grid

Before (the payload as the API returned it)
[
  {
    "id": 1001,
    "customer": {
      "name": "Ada Lovelace",
      "city": "London"
    },
    "total": 45.99,
    "tags": ["priority", "gift"]
  },
  {
    "id": 1002,
    "customer": {
      "name": "Grace Hopper",
      "city": "Arlington"
    },
    "total": 219.5,
    "tags": ["net-30"]
  }
]
After (what the sheet holds)
id     customer.name   customer.city   total
1001   Ada Lovelace    London          45.99
1002   Grace Hopper    Arlington       219.5

The header row is printed bold, one row of the sheet holds one record, and the nested customer object is split into two columns. A cell that begins with an equals sign, a plus, a minus, or an at sign is stored as text in the file, which blocks formula injection when the workbook opens. Turn that option off only when you want the spreadsheet to run those expressions itself.

Use Cases

Developer Production Workflow
Export a debug dump of API responses so QA can sort and filter it Self-service JSON to xlsx for support teams answering ticket questions Turn a CMS content dump into an editorial review sheet
Check that a fixture flattens into the columns a test asserts on Hand finance a workbook where totals are numeric and sum correctly Move form submission payloads into a weekly review sheet
Share a log excerpt with someone who will not open a text editor Publish incident records from a JSON endpoint as a spreadsheet Build a migration checklist from an export of legacy records

When to use this tool

  • An API endpoint returns an array of objects and the person reading it only opens Excel.
  • Finance wants a sheet where the money column is numeric and sums without editing every cell.
  • A JSON dump from a CMS has to circulate as an attachment for a content review.
  • Support needs an export on their own instead of waiting for an engineer to write a script.
  • A nested payload has to be flattened so each field lands in its own column with a dotted name.
  • Records arrived with values beginning with = and the workbook still has to open safely.

Best practices

  1. Leave flattening on for nested payloads, because dotted headers are what let a reader sort and filter by a nested field.
  2. Turn number coercion off for identifiers, zip codes, and phone numbers so leading zeros survive the trip into the cell.
  3. Keep formula escaping on for JSON that came from a form, a ticket, or an API outside your control.
  4. Read the stats line before downloading; a row count that misses your source count means the payload was wrapped or truncated.
  5. Give the sheet a name you will recognize in the tab bar, since the same name becomes the file you download.
  6. Split a very large payload into parts first, because the rows, the worksheet markup, and the zip share the memory of one tab.

Common mistakes

  1. Pasting a payload wrapped in one outer object, which flattens into a single row of value columns instead of the records you expected.
  2. Expecting an array inside an object to become extra rows; it stays one cell, so switch to join mode when the cell should read like a list.
  3. Leaving number coercion on for identifier columns, which drops the leading zeros permanently once the cell is numeric.
  4. Switching formula escaping off for JSON that arrived from outside, which lets a cell beginning with = run when the file opens.
  5. Waiting for more than one worksheet from a single pass; each conversion writes one sheet, so a payload with three sections needs three conversions.

Frequently asked questions

Can I paste a single JSON object instead of an array?

Yes. A top-level array is read as a list of records, and each element becomes one row in the sheet. A single object becomes a single row with its keys spread across the header columns. A top-level array of plain strings or numbers becomes one value column with one row per item. When the array is empty, the tool says so instead of writing an empty workbook.

What does flattening do to nested objects?

Flattening is on by default, and it takes an object inside a record apart into separate columns. The column name is the path joined with dots, so a customer object holding name and city produces customer.name and customer.city. A record that misses one of those keys gets an empty cell rather than an error, which is how sparse records end up sharing one header. Switch the option off when you would rather store the whole nested object as one JSON string in a cell.

How are arrays inside my objects handled?

Arrays never split into extra rows, because that would multiply your record count. In json mode, the default, an array is written as a single JSON string such as ["priority", "gift"]. In join mode the items are converted to text and joined with the separator you set, which reads better for tag lists. Use json when the structure matters and join when the cell should read like a plain list.

Why does a cell starting with an equals sign get an apostrophe?

A value that begins with =, +, - or @ can be read as a formula when the workbook opens, and a formula can run a command or pull data over the network. Formula escaping is on by default, so such a value is stored with an apostrophe in front of it and Excel shows the original characters as text. That matters for JSON that arrived from a web form, a support ticket, or an API outside your control. Numbers like -20 still become numeric cells, because a minus in front of digits is a negative value rather than a formula. Turn the option off only when you want those expressions evaluated.

Does any of my data leave this browser?

No upload happens on this page. The text area, the file reader, the row builder, and the JSZip packer all run inside this tab, so records are read and written in local memory. The page load and the layout analytics script are the only network requests, and neither one sees a cell. Closing the tab discards the input along with the workbook that was built from it.

Can Excel open the file this tool produces?

Yes. The output is a standard OOXML package, a zip holding the content types, relationships, workbook, styles, and worksheet parts that Excel, LibreOffice Calc, Google Sheets, and Numbers all read. The header row carries the bold style, and numeric cells hold a bare value so totals work as soon as the file opens. Download it with the .xlsx extension, which is what spreadsheet apps look for when deciding which program to use.

What are the rules for the sheet name?

Excel allows 31 characters per sheet name, so anything longer is cut to that length before the workbook is written. The characters [ ] : * ? / and \ are rejected in a sheet name and are stripped here, along with control characters. A name that is empty after that cleanup falls back to Sheet1. The sheet name also becomes the file name of the download after the same characters are removed.

How to convert JSON to Excel

  1. Add your JSON Paste a payload into the box or pick a .json file from disk; the reader runs on this device and fills the box for you.
  2. Set the sheet name and options Name the tab, keep flattening on or off, choose json or join for arrays, and decide about numeric cells and formula escaping.
  3. Read the preview and stats The preview table shows the header row and the first five rows, and the stats line reports rows, columns, and file size.
  4. Convert and download Press Convert to XLSX to rebuild the workbook on demand, then press Download XLSX to save it as a sheet.