Purplelink
← All tools

Free web tool

JSON to CSV

Convert JSON from an API, a survey tool or a database export to a CSV file or an Excel workbook. Nested objects become columns, every key gets a column, and long numeric IDs are kept digit for digit. The file is read on your device. Nothing is uploaded.

Options
Save as
Nested objects

Bytes of your files sent anywhere: 0

Files are read and converted in this tab, in a background worker. The only requests the page makes are for its own scripts. Your files are never sent anywhere.

How it works

The page looks for the rows in your file. A JSON array is the rows. An API reply such as {"data": [...]} uses its largest list of objects, and the row says which key that was. A file with one JSON value per line is read as JSON Lines.

Every key becomes a column, in the order the keys first appear, so records with different fields still line up. A nested object such as {"user": {"name": "Ada"}} becomes a column user.name. Lists stay as JSON text in one cell, since they have no fixed width.

Browsers round integers past 9,007,199,254,740,991 when they read JSON, which quietly breaks long IDs. This page reads those numbers as text before parsing, so a 19-digit ID comes out exactly as written.

How to convert JSON to CSV

  1. Pick CSV or XLSX. CSV for scripts and databases, XLSX to open in Excel with long IDs kept as text.
  2. Choose how nested objects are written. As columns gives one column per nested field; As JSON text keeps each object in one cell.
  3. Add the files. Drop the JSON files on the box, or click it to choose them.
  4. Download. Download each result from its row, or use Download all as .zip.

Limits

Questions

Are my files uploaded?
No. The page reads each file with your browser and converts it in a background worker in this tab. There is no server step. The meter under the drop zone counts the bytes the page and its worker send while they work, so you can check this yourself. The only things the page downloads are its own scripts.
What JSON shapes does it read?
An array of objects, an object that holds such an array (common in API replies), a single object, an array of plain values, and JSON Lines with one value per line. Records do not need the same keys.
How are nested objects handled?
With As columns, {"user": {"name": "Ada", "age": 36}} gives the columns user.name and user.age. With As JSON text, the whole object goes in one user column. Lists are always kept as JSON text. If a record already has a key named user.name, the flattened one becomes user.name (2).
Will my long IDs survive?
Yes. Integers of 16 digits or more, such as social media post IDs, are read as text before the browser parses the file, so they are written exactly. In Excel output they are text cells, so Excel cannot round them either.
Why does some text start with an apostrophe?
Text that starts with =, +, - or @ can run as a formula when Excel opens a CSV. The apostrophe makes Excel treat it as text. Numbers are never changed. Turn the option off for CSVs meant for scripts.
Is it free?
Yes. There is no account, no watermark and no limit beyond the sizes above.

If this saves you time, you can leave a tip. It helps keep these tools free and online.