Code Tools

JSON to CSV

All tools

Convert an array of JSON records into a CSV file you can open in Excel or Google Sheets.

How it works

Four simple steps

1

Paste a JSON array

Use an array of objects, such as rows returned by an API.

2

Header from all keys

Every key seen in any record becomes a column.

3

Cells escaped

Commas, quotes and line breaks are quoted the standard CSV way.

4

Download data.csv

Copy the rows or download the file for Excel or Sheets.

JSON to CSV

About JSON to CSV

Someone on the sales team wants last week's orders in a spreadsheet, and all you have is the JSON your admin API returns. Converting it to CSV takes one paste.

The converter expects an array of objects; a single object is treated as a one-row array. It collects every key that appears in any record to build the header row, in the order keys are first seen, so a field present on only some records still gets a column and is left empty elsewhere. Values containing commas, double quotes or line breaks are wrapped in quotes with inner quotes doubled, following the usual CSV convention. Nested objects and arrays are written as JSON text inside the cell. Output appears as you type and downloads as data.csv.

The separator is always a comma. In regions where Excel expects semicolons, import the file through Data, From Text/CSV and pick comma explicitly instead of double-clicking it. Nested data is not flattened into extra columns, so flatten the objects first if you need address.city as its own column. Make sure the input parses with the JSON Validator, go back the other way with CSV to JSON, or turn the rows into database inserts using the CSV to SQL generator.

Records are converted inside the browser, which keeps customer exports off third-party servers.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

Not in this tool. Output is always comma separated. If you need another delimiter, a find and replace on the output works as long as no cell contains that character.

Both become empty cells. A spreadsheet cannot tell the difference between a null value and a key that was absent from that record.

The converter treats the whole object as one row, so the array ends up as JSON text in a single cell. Paste only the inner array to get one row per record.

View more FAQs

Related tools

View all

HTML Formatter

Beautify and indent HTML markup.

Open

CSS Formatter

Format and pretty-print CSS.

Open

JS Formatter

Beautify JavaScript code.

Open

JSON Formatter

Beautify and validate JSON.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools