Why Convert JSON to CSV?
JSON (JavaScript Object Notation) is the standard format for APIs and web services, but it is not ideal for spreadsheet analysis or sharing with non-technical team members. CSV (Comma-Separated Values) is universally supported by Excel, Google Sheets and virtually every data tool.
How JSON to CSV Conversion Works
A JSON array of objects is the most common input format. Each object's keys become the CSV column headers, and each object becomes a row. For example:
[{"name":"Alice","age":30},{"name":"Bob","age":25}]Becomes:
name,age\nAlice,30\nBob,25Handling Nested Objects
When JSON objects contain nested objects (e.g. {"address":{"city":"London"}}), a good converter flattens these using dot notation — the key becomes address.city in the CSV header.
The Fundamental Limitation: Arrays Within Arrays
CSV is inherently a flat, two-dimensional format — rows and columns — while JSON can nest arbitrarily deep. Dot-notation flattening works well for nested objects, but a JSON field that's itself an array of multiple values (like a list of tags or phone numbers per record) has no clean CSV equivalent: most converters either join the array into a single delimited string within one cell, or create multiple numbered columns, and neither perfectly preserves the original structure if you convert back to JSON later.
A Data-Loss Mistake Worth Knowing About
JSON distinguishes between the number 30, the string "30", and the boolean true, but CSV has no type system at all — everything becomes plain text. This means converting JSON to CSV and back can silently change a field from a number to a string, which causes subtle bugs in code that later expects numeric comparisons to work. If round-tripping data through CSV, it's worth spot-checking that number and boolean fields didn't quietly become text strings after the conversion.
Escaping Special Characters
Per RFC 4180, values containing commas, double quotes or newlines must be wrapped in double quotes. Any double quotes within a value are escaped by doubling them (""). A good converter handles this automatically.
Convert JSON to CSV Free
Our JSON to CSV Converter handles all of the above automatically. It also converts CSV back to JSON with the CSV → JSON tab, and lets you download the output as a .csv or .json file.


