← All tools
// Converter

JSON to CSV online

Convert JSON arrays to CSV format — download or copy the result

JSON to CSV Converter logo
by
CHUNKY
MUNSTER
// JSON Input (array of objects)
// CSV Output
Output will appear here...

How to Use the JSON to CSV Converter

  1. Paste a JSON array of objects (or a single object) into the input panel.
  2. Click Convert to CSV — the header row is the union of all keys.
  3. Read the result, then click Download .csv to save it.
  4. Re-open the .csv in Excel or Google Sheets — quoting follows RFC 4180.

A JSON array maps to CSV row-for-row, but real-world arrays rarely have perfectly uniform shapes. This converter walks every object first to build a header row that is the union of all keys, in first-appearance order. Rows that don't have a particular key produce an empty cell rather than throwing — that is the most useful behaviour when consuming output from APIs that omit nulls.

How the JSON to CSV Converter Works

Quoting follows RFC 4180 strictly: a field containing , " or newline is wrapped in double-quotes, and any internal double-quote is escaped by doubling it. That output imports cleanly into Excel, Google Sheets and Postgres COPY without further massaging. Nested objects and arrays are JSON-stringified into a single cell because CSV is intentionally flat — the structure is preserved as text and is round-trippable via JSON.parse.

Frequently Asked Questions

What if my array contains objects with different keys?

The header row is the union of every key in first-appearance order. Rows that lack a key just produce an empty cell, so heterogeneous arrays still convert cleanly.

How are nested values represented?

Objects and arrays are JSON-stringified into a single cell. CSV has no notion of nesting, so this is the round-trippable convention — JSON.parse the cell later if you want the structure back.

Does the CSV use Excel-friendly quoting?

Yes — RFC 4180. Any field containing a comma, double-quote or newline is wrapped in double-quotes, and any internal double-quote is escaped as "". Excel, Google Sheets, LibreOffice and Postgres COPY all accept this.

What if I pass a single object instead of an array?

It is wrapped to a one-row array automatically. The keys become the header row, the values become the only data row.

Explore the full suite of Converter tools and 290+ other free utilities at Chunky Munster.