← All tools/Minifiers/Code/JSON to CSV Converter
JSON to CSV Converter
Paste a JSON array of objects and download a clean CSV spreadsheet — nested fields flattened with dot notation.
A JSON array of objects, or a single object. Nested objects are flattened with dot notation (address.city) when flattening is on.
CSV output
name,age,city Asha,28,Hyderabad Ravi,31,Mumbai
How it works
Headers = the keys of the first object, in order (new keys in later rows are added). Each object becomes one row; nested objects flatten to dot keys (address.city). A field is quoted when it contains the delimiter, a quote or a newline (RFC 4180); a quote inside a field is doubled.
Take [{"name":"Asha","age":28},{"name":"Ravi","age":31}]. The keys of the first object — name, age — become the header row, and each object becomes one row: name,age on the first line, then Asha,28 and Ravi,31. With flattening on, an object like {"name":"Asha","address":{"city":"Hyderabad"}} gains the column address.city instead of a nested object.
Frequently asked questions
What if my objects have different keys?
Every key found in any object becomes a column, in the order it first appears. An object missing a key gets an empty cell in that column — nothing is dropped.
How are nested objects handled?
With flattening on (the default), {"address": {"city": "Hyderabad"}} becomes a column called address.city. Switch flattening off and the nested object is written as a JSON string inside one cell instead.
What happens to commas and quotes inside a value?
The converter follows RFC 4180: a field containing a comma, a quote or a newline is wrapped in double quotes, and any quote inside it is doubled. So a value like Say "hi", friend becomes "Say ""hi"", friend" and still opens as one cell.
Will the CSV open in Excel and Google Sheets?
Yes. Download the .csv file and open it directly, or import it — Excel, Google Sheets and LibreOffice all read comma-separated CSV. If your numbers use commas as decimals, pick the semicolon delimiter instead.
Tell us what you think
Loving this tool, or stuck on something? Tell us — it takes a minute.
We’ll only use your name and email to reply if needed. The tool and page are filled in for you.