LocalExcelTool
Get started

JSON to CSV

Flatten a JSON array into CSV, with the union of all keys as the header — no upload.

Runs in your browserNo account neededFree

What is JSON to CSV

JSON to CSV conversion takes the union of every object's keys as the header row and writes one line per object, so ragged data never shifts columns. Nested values land as JSON text inside a single cell; flatten them first if you want separate columns.

File

No file chosen

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

Making a rectangular file out of nested objects

CSV requires every row to have the same columns, so the header is the union of all keys across all objects. Rows missing a key get an empty cell. That is the only lossless mapping — any other choice drops data.

Nested objects are flattened into dotted column names, and arrays are joined with a separator inside one cell. Both choices keep one CSV row per JSON record, which is what makes the result usable in Excel or a database.

Values containing commas, quotes or newlines are quoted, so the file stays parseable even when the text is messy. Excel will still open it correctly on import.

Where information is lost

Type information disappears. A number and a string that looks like a number become identical in CSV, so the receiving system has to guess. If the distinction matters, keep the JSON or add a type column.

Deeply nested arrays cannot be represented faithfully. Joining them into one cell preserves the values but not the structure; if you need the structure, the data should stay JSON.

Key order becomes column order, and JSON objects are technically unordered. The converter preserves the order it encounters, but do not rely on it across different sources.

How to use it

  1. 1.Paste JSON or choose a .json file
  2. 2.Click Run
  3. 3.Download the generated .csv

How JSON to CSV works under the hood

An .xlsx file is not a table — it is a ZIP archive of XML parts. Everything you see as a grid is rebuilt from cell references on this page, in memory, without a round trip to a server.

  1. 1

    Read the file as bytes

    The file is read into an ArrayBuffer with the File API. This is a local read, not a request — nothing leaves the tab.

  2. 2

    Unzip and parse the workbook

    SheetJS inflates the archive, reads workbook.xml for sheet order, sharedStrings.xml for text, and each sheet's XML for cells and types.

  3. 3

    Rebuild rows in memory

    Cells are placed by their A1 reference, gaps become empty cells, and the sheet is materialised as a two-dimensional array.

  4. 4

    Write the output locally

    The result is serialised to CSV text or a new workbook and handed to the browser as a Blob download.

  5. Processing pipeline

Why formulas arrive as values

A spreadsheet stores two things per formula cell: the formula text, and the value Excel last computed and cached. A browser parser reads the cached value. Making the formula itself run would mean reimplementing Excel's calculation engine — including volatile functions, circular-reference detection and locale-specific parsing. So the exported CSV contains what you last saw on screen, not a live formula.

What has no CSV equivalent

Merged cells, cell fills, fonts, conditional formatting, comments and pivot tables have no representation in a comma-separated file. A merged cell becomes its value in the top-left position and empty cells elsewhere. Dates are written as dates only when the cell is typed as a date; a date stored as text stays text. These are format limits, not bugs.

Where it gets slow

Parsing is linear in cell count, and the browser holds the whole workbook in memory. A 30 MB file with a million populated cells can take several seconds and a few hundred MB of RAM; the tab may feel frozen while SheetJS works. Splitting the file by sheet, or exporting only the range you need, is faster than retrying with a bigger limit.

Verify it yourself

You do not have to take this on faith. Run the tool once with DevTools open.

  1. 1.Open DevTools on this page and switch to the Network tab
  2. 2.Keep the filter on Fetch/XHR and run the tool
  3. 3.Confirm no request carries your file — you should see only page assets and fonts

Frequently asked questions

What happens to nested objects?

They are written as JSON text in one cell. Flatten the data beforehand if you need them as columns.

Will Excel show garbled text?

No. The file is written with a UTF-8 BOM, so double-clicking it in Excel keeps non-ASCII text intact.

My objects have different keys — is that a problem?

No. The header is the union of all keys and missing values are left empty.

What this kind of conversion cannot keep

Spreadsheet conversion is lossy by nature: a workbook carries formulas, styles, merged cells and multiple sheets, while CSV carries rows of text. This tool keeps values and order, recalculates nothing, and drops presentation on purpose. That is why it can run without a server — and why a converted file will not look like the original.

More in Spreadsheets & Docs