Convert JSON to CSV: Headers, Nested Values and Spreadsheet Pitfalls

Convert JSON records to CSV and check missing fields, nested objects, quotes and spreadsheet imports with a worked example.

Convert JSON to CSV: Headers, Nested Values and Spreadsheet Pitfalls

JSON records don't always have the same fields. That's where a quick CSV export can go wrong: a later row has an extra value, a comma splits a note into two cells, or a spreadsheet changes an identifier.

The JSON to CSV converter accepts one object or an array of objects. Here's what to check before importing the result.

Try records with different fields

[
  {"name": "Sam", "note": "Hello, world", "active": true},
  {"name": "Alex", "score": 42}
]

The headers appear in the order the keys are first found: name, note, active, then score. A field missing from a row becomes an empty cell.

Null values also become empty cells. If you need to distinguish a missing value, null and an empty string, keep the JSON or add a separate status field before converting.

Check commas and quotes

Hello, world belongs in one cell. The exporter wraps fields containing commas, quotes or line breaks in double quotes. A quote inside a field is doubled. The CSV format description explains these conventions.

If everything opens in one spreadsheet column, try the import dialog and select a comma delimiter and UTF-8 encoding. The file may be fine while the spreadsheet is expecting a different separator.

Decide what to do with nested objects

An object such as address becomes JSON text inside one cell. The converter doesn't turn it into separate address.city and address.country columns.

If you need those columns, flatten the records first. Be especially careful with arrays: expanding one customer's three orders into three rows changes what a row represents and how you count customers.

Leave formula protection on for unfamiliar data

A spreadsheet can treat a string beginning with a formula character as an instruction. The converter's formula protection adds an apostrophe to formula-like strings and headers. A numeric negative value remains numeric text.

That protection changes the exported string. Keep it enabled for data you don't control, and check the import in your spreadsheet. If another system needs the exact original strings, review its handling before disabling the protection.

Check the limits and the imported values

The tool accepts up to 1 MB of JSON, 10,000 rows and 250 columns. It rejects empty arrays and arrays of plain values because it needs named fields for the columns.

After import, check row counts, dates, leading zeros and long IDs. A CSV file doesn't carry all the type information from JSON, and spreadsheet software may make its own guesses. Keep the original so you can correct the import or export it again.

Try this workflow

Use JSON to CSV Converter and inspect the result using the checks in this guide.

Open JSON to CSV Converter