Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

JSON to CSV

Convert a JSON array of objects to CSV. Nested objects flatten into dot-path columns, quoting follows RFC 4180, and you choose the delimiter.

Processed locally in your browser — nothing is uploaded.

JSON to CSV

0 characters

CSV

Output appears here…

Nested objects become dot-path columns (contact.email), the header is the union of all keys, and fields containing the delimiter, quotes, or newlines are quoted per RFC 4180.

About JSON to CSV

Turn a JSON array of objects into CSV you can open in a spreadsheet. Nested objects are flattened into dot-path columns (contact.email), the header is the union of every key across all rows in first-seen order, and cells containing the delimiter, quotes, or newlines are quoted exactly as RFC 4180 requires.

Common uses

  • Export an API response for analysis in Excel or Google Sheets
  • Hand structured data to a non-technical teammate
  • Convert seed data from JSON fixtures into CSV imports

Example

Input

[{"name":"Ada","contact":{"city":"London"}}]

Output

name,contact.city
Ada,London

Limitations

  • The input must be a JSON array of objects — a single object or array of primitives is rejected
  • Arrays inside a row are kept as JSON text in their cell rather than exploded into columns

Frequently asked questions

How does nested JSON turn into flat CSV columns?

Nested objects are flattened into dot-path column names, so {"contact": {"email": ...}} becomes a contact.email column. The header row is the union of every flattened key across all rows, in the order each key first appears.

Why is my JSON rejected with an 'array of objects' error?

CSV rows map to objects, so the top level must be a JSON array where every element is an object, like [{...}, {...}]. A single object, an array of numbers or strings, or an empty array can't be converted — wrap a single object in brackets to export it as one row.

Is my data uploaded when I convert JSON to CSV?

No. The conversion runs completely in your browser, so exports containing customer records or financial figures stay on your device.

What happens to arrays inside a row?

They're written into their cell as JSON text, like ["a","b"], rather than split into extra columns or rows. Only nested objects are flattened; arrays keep their structure so nothing is lost.

When does a CSV cell get wrapped in quotes?

Exactly when RFC 4180 requires it: the cell contains the delimiter, a double quote, or a line break. Quotes inside a quoted cell are doubled (""), and all other cells are written bare.