Convert JSON to CSV

Convert array of object in JSON format to CSV.


What Does Converting JSON to CSV Do?

JSON returned by an API is a format meant for machines, so a spreadsheet cannot open it as it stands. This tool reads an array of JSON objects and converts it to CSV, with the keys as the header row and each element as one row. The result is something you can total and sort in Excel or Google Sheets.

There are two assumptions. The first is that the input is an array of objects — wrap a single object in an array before entering it. The second concerns deep nesting: when a value is itself an object or an array, it is not expanded into columns but placed in the cell as a JSON string. Flattening beforehand makes the result easier to work with.

Steps to Convert JSON to CSV

  1. Paste your JSON Paste an array of objects into the input box. Copying an API response straight in is fine.
  2. Check the converted result The keys become the header row and each element becomes a row. Confirm that the columns you expected are present.
  3. Download the CSV The character encoding is UTF-8. If the text is garbled when opened in Excel, specify UTF-8 during import.

Tips for getting more out of it

  • The input must be a JSON array of objects ([{}, {}, ...]). Single objects are not supported.
  • Useful when you want to work with REST API response data in Excel or Google Sheets.
  • Values in deeply nested objects or arrays are not flattened — they are output as a JSON string (e.g. {"a":1}).
  • The downloaded CSV is encoded in UTF-8. If you see garbled characters in Excel, open it as UTF-8 with BOM.

When JSON to CSV Conversion Comes in Handy

Totalling an API response

Turn the data you fetched into CSV and you can total it directly with spreadsheet functions or a pivot table.

Sharing with non-engineers

Hand the data over in table form to someone who cannot read raw JSON. It makes asking for a review or a correction far easier.

Using CSV as an intermediate format for migration

Useful for converting data on its way into a tool that accepts CSV import — and a great many services do.

Checking record counts and gaps

In a table, the number of rows and any blank cells are visible at a glance, which suits checking that you have the number of records you expected.

JSON and CSV Terms

Array of Objects
A structure listing several objects in the form [{...}, {...}]. Because each one corresponds to a row of a table, it can be converted to CSV.
Key
The name that points to a value inside an object. In CSV it becomes a column name in the header row.
Nesting
A structure in which a value itself contains a further object or array. This is the part that does not fit neatly into a table.
Flattening
Expanding nested structures into a single level. Doing this beforehand lets them be handled as CSV columns.
BOM
A byte-order marker placed at the start of a file to indicate the encoding. It is used when you want Excel to open a UTF-8 CSV correctly.

FAQ

No, the tool only accepts a JSON array of objects ([{}, {}]). If you have a single object, wrap it in an array first (e.g. [{}]).

Deeply nested values are not flattened — they are output as a JSON string (e.g. {"a":1} for an object). Flatten your JSON structure before converting if you need those values in separate columns.

The downloaded CSV is UTF-8 encoded. In Excel, use "Data" → "From Text/CSV" to import it and select UTF-8 (or UTF-8 with BOM) as the encoding.
Tool-kun

Side Note — The Origin of JSON: "Discovered", Not Invented

JSON (JavaScript Object Notation) was formalized by Douglas Crockford around 2001. He has said that he did not invent JSON — he discovered it. He standardized the object literal syntax already present in JavaScript into a data interchange format.

From around 2006, JSON spread rapidly alongside the rise of Ajax (asynchronous communication). Its simplicity compared to XML's verbose syntax won over developers. While early critics said "JSON can't replace XML," it is now the de facto standard data format for REST APIs.

As an interesting aside, Crockford included the clause "The Software shall be used for Good, not Evil." in the JSON spec's copyright notice. This caused a minor stir when legal departments at large companies like Google and IBM requested a formal license because they couldn't commit to determining what counts as "good."