JSON to CSV: examples, nested fields and common mistakes

CSV represents rows and columns. JSON can contain nested objects and arrays. Here is how to check the conversion.

Example: JSON records to CSV rows

[{"name":"Amina","score":91},{"name":"Ben","score":88}]

Produces:

name,score
Amina,91
Ben,88

Open the JSON to CSV converter

Nested objects become dotted columns

Input: [{"user":{"name":"Amina"},"active":true}]
Columns: user.name,active

ByteKitly flattens nested object properties into dot-separated column names. Arrays remain JSON strings inside individual CSV cells rather than generating additional rows.

Missing values and data types

When one record has a field that another lacks, the missing cell is blank. Null also becomes an empty cell, so CSV cannot preserve that distinction by itself. Spreadsheet software may infer numbers, dates or booleans differently from your source data.

Commas, quotation marks and line breaks

CSV fields containing commas, double quotes or line breaks are wrapped in double quotes. Embedded quotes are doubled. Inspect the exported file before importing it into another application.

Checklist before exporting

  1. Start with a JSON array of objects.
  2. Validate the input with the JSON Validator.
  3. Review dotted column names, arrays and blank cells.
  4. Inspect the result using the CSV preview or convert it back with CSV to JSON.

For a deeper example, read the nested JSON to CSV guide.