JSON to CSV
Convert JSON files to CSV format.
How to Convert JSON to CSV
Paste your JSON array
Drop or paste an array of objects โ the typical shape of API responses and exports.
Flattening runs locally
Object keys become column headers and each object becomes a row, right in your browser.
Download the CSV
Open the result in Excel or import it anywhere CSV is accepted.
Flattening a tree into a grid
JSON is hierarchical and CSV is a flat table. Every conversion is therefore a decision about how to represent nesting in a structure that has none. A nested object usually becomes columns joined by dots โ `address.city`, `address.postcode` โ which works well and is easy to read back.
Arrays are harder, because there is no obvious column count. An order with three items can become three columns, one column containing a joined string, or three rows repeating the order details. All three are used, and which is right depends entirely on what you plan to do with the file.
Records that do not share the same shape
A CSV needs one header row that covers every record. If the objects have different keys โ because a field is optional, or the data evolved over time โ the header must be the union of all keys, and every record without a given key leaves that cell empty.
An empty cell is ambiguous in a way JSON is not: it could mean the key was absent, present but null, or present with an empty string. CSV cannot distinguish these, and that information is gone once converted.
What CSV cannot carry
Types are the main loss. Numbers, booleans and nulls all become text, and the distinction between the number 1 and the string '1' disappears. Anything reading the CSV afterwards has to guess the types back, and it will guess wrong on identifiers with leading zeros and on very long numbers.
Deeply nested structures also stop being useful long before they stop being possible. Three or four levels of nesting produce column names nobody can read and a file nobody can work with. At that depth, a spreadsheet is the wrong destination.
Escaping, or how spreadsheets get broken
Any value containing the separator, a quotation mark or a line break must be quoted and escaped. A single unescaped comma inside a description field shifts every subsequent column in that row, and the file still opens โ it is simply wrong from that row onwards.
This is worth checking specifically, because it is the failure that survives a casual glance. Open the result and look at a row containing free text, not just the first three rows.
When to convert at all
The good reasons are all about the destination: someone needs to open it in a spreadsheet, a system only ingests CSV, or a non-technical colleague needs to read it. If the consumer can handle JSON, keeping the structure is almost always better.
Conversion happens in your browser, so API exports and internal records are not uploaded. That matters here more than usual, since JSON exports frequently contain tokens and personal data that people forget are in the file.