Utilumo
LightDarkSystem
Guide1 min readUpdated June 29, 2026

How to convert JSON to CSV

Short answer

To convert JSON to CSV, take an array of objects, use the object keys as the column headers, and write each object as a row. Nested objects and arrays need to be flattened or stringified, since CSV is a flat table.

From objects to rows

CSV is a flat table, so the natural source is a JSON array of objects. Each object becomes a row, and the union of their keys becomes the header row of columns.

[{"id":1,"name":"Ada"},{"id":2,"name":"Grace"}]

id,name
1,Ada
2,Grace
JSON in, CSV out
Try it: JSON to CSVConvert a JSON array of objects into CSV locally in your browser.Open tool

Nested data needs flattening

CSV has no concept of nesting. A nested object is usually flattened into dotted columns like address.city, while an array is either expanded into columns or written as a single stringified cell. Decide which fits how the data will be used.

Mind commas and quotesAny value containing a comma, quote, or newline must be wrapped in quotes so the columns stay aligned. A good converter handles this for you. See How to convert CSV to JSON.

References

Questions

What happens to nested objects when converting to CSV?

They must be flattened, often into dotted column names like address.city, or written as a stringified value in one cell, because CSV cannot represent nesting directly.

Do all objects need the same keys?

Not necessarily. A converter collects every key across the objects to form the columns, leaving cells empty where an object lacks a key.

Does this send my data anywhere?

No. Utilumo's developer tools parse and transform input inside the browser tab. Nothing is uploaded, stored, or logged.

Keep reading