JSON to CSV
Flatten an array of objects into CSV.
FreeRuns in your browserNo signupUpdated 2026-10-29
Keys that appear in only some records become empty cells in the others. Runs entirely in your browser.
Status
Converted
Rows
3
Data rows, header excluded
Columns
8
id, name, email, address.city, …
id,name,email,address.city,address.country,tags.0,tags.1,phone 1,Asha Rao,asha@example.com,Hyderabad,IN,lead,web, 2,Omar Haddad,omar@example.com,Dubai,AE,client,, 3,Priya Nair,priya@example.com,Kochi,IN,,,+91 98765 43210
About this tool
How it works and how to read the result.
Need this done for you?
Web app & SaaS development
SaaS products and web apps, from first version to scale.
See the serviceWhat it does
The JSON to CSV converter takes an array of objects and writes one row per object, with a header built from every key found across all records. Nested objects are flattened into dot-separated columns and arrays into numbered ones, so a record with an address and a list of tags becomes a flat row a spreadsheet can read. Values containing commas, quotes or line breaks are quoted correctly. You choose the delimiter, which matters for Excel in some regions, and the conversion happens in the browser, so exports with customer data stay on your machine.
How to use it
- Paste the JSON. An array of objects is ideal; an object that contains one, such as an API response with a
dataproperty, also works. - Leave flattening on unless you want nested values kept as JSON text in one cell.
- Pick the delimiter. Comma is standard; semicolon suits Excel in many European locales.
- Check the row and column counts, then copy the CSV or download
data.csv.
How to read the result
The counts tell you whether the structure came out as expected. Three customer records with an id, name, email, nested address and a tags array produce 3 rows and about 8 columns: id, name, email, address.city, address.country, tags.0, tags.1 and, if one record has a phone, phone. That last column is empty for the other two rows, which is the correct way to represent a missing key in CSV.
A column count much higher than you expected usually means a long array in one record, since each element gets its own column. If that is the case, turn flattening off so the array is stored as a JSON string, or trim the array before converting.
The header order follows the order keys first appear, record by record. If you need a fixed column order, reorder the keys in the first record and the rest will follow.
For the reverse direction use CSV to JSON. Data exports and imports like this come up in most web app development projects.
Questions
Frequently asked.
What happens to nested objects?
With flattening on, each nested value becomes its own column named by its path, so an address object produces address.city and address.country. Arrays are numbered the same way, as tags.0 and tags.1. With flattening off, nested values are written as JSON text inside a single cell.
Why does Excel put everything in one column?
Excel on a system with a European locale expects semicolons rather than commas. Choose the semicolon delimiter and open the file again. Alternatively use Excel's Data, From Text/CSV import, which lets you pick the separator yourself.
My JSON is an object, not an array. Will it work?
Yes. The converter looks for the first array of objects inside the root object, which covers common API shapes such as a data or results property. A plain object with no arrays is written as a single row.
Your next move
Like what you see? Tell us about it.
A process that takes too long, a website that undersells you, or an idea ready to take shape. Tell us where you are and we will suggest a useful next step.
India · Working with clients worldwide