Data & Code

JSON to CSV

Convert an array of flat JSON objects to CSV.

Read the guide

Run the tool

The calculation runs in your browser. This tool does not send your input to JVR Software.

More information

Back to the tool

What it is and when to use it

JSON to CSV converts a list of objects into a table you can open in a spreadsheet or import into another system. It is handy for exports with one object per person, product or event. It expects a flat row shape because CSV has columns and cells rather than nested objects and arrays.

How it works

Each object becomes a row, and the union of encountered keys becomes the set of column headings. Delimiters and double quotes inside a cell need CSV escaping. Missing values become empty cells. Decide how to flatten nested fields and represent nulls before trying to use the output as a durable interchange format.

How to use it

  1. Prepare a JSON array whose objects all represent the same kind of record.
  2. Run the converter and inspect the header row and any cells containing commas or newlines.
  3. Import into your spreadsheet explicitly as UTF-8 CSV and select Text for identifiers that must keep leading zeroes.

Worked example

Use [{"name":"Ava","count":2},{"name":"Sam","count":3}]. The first row is name,count, followed by Ava,2 and Sam,3. If a later object adds a city key, expect a city column and blanks where older objects have no city.

Reading the result

The header row defines the column mapping. CSV does not carry JSON types, so a spreadsheet can reinterpret a date, a long ID or an empty cell. Keep a copy of the source JSON when preserving exact types matters.

Common mistakes and limits

Flatten nested objects yourself with meaningful keys such as address_city. Handle spreadsheet formula-leading values carefully when exporting data from other people. CSV quoting preserves syntax and does not by itself mark a spreadsheet cell as plain text.

A blank cell can represent an absent value, an explicit null or an empty source string. Define a convention before exporting if that distinction matters. For identifiers longer than JavaScript can represent exactly as numbers, use quoted strings in the source JSON to preserve their digits.