How to Convert JSON to CSV
How do I convert JSON to CSV?
Paste an array of JSON objects into a converter and it emits one CSV row per object, with the keys as the header. The ideal input is a flat array such as [{"id":1,"name":"Alice"},{"id":2,"name":"Bob"}], which maps to two rows and two columns. Nested objects and arrays need a flatten step first.
The ideal input
A JSON array of flat objects with the same keys. Each object becomes a row, each key a column, and the keys of the first object become the header row.
What a converter does
It parses the JSON, collects the keys as columns, then writes one line per object. Values are quoted and escaped so that commas and newlines inside a value do not break the table.
Single object input
A single object such as {"name":"Alice","age":30} becomes one row. If your file wraps an array under a key such as {"data":[...]}, select that array as the row source.
When you need flattening
A value that is an object, like an address, or an array, like hobbies, does not fit a flat cell cleanly. Converters handle this with dot-notation columns or by stringifying the nested value, which the nested JSON guide covers in detail.
Common pitfalls
Invalid JSON fails before conversion, so validate first. Mixed keys across records produce empty cells for missing fields. Large files are best handled by a converter that processes them locally in the browser.
FAQ
What JSON converts cleanly to CSV?
An array of flat objects with consistent keys. Each object maps to a row and each key to a column.
What happens to missing fields?
Records that lack a key that other records have get an empty cell for that column.
Does the conversion run on my machine?
On this site yes, the conversion happens locally in your browser and nothing is uploaded.
Can I convert a JSON file with a wrapper object?
Yes. Most converters let you select the array that holds the rows, such as the value of a data or results key.