A JSON export is easy for a program to read and miserable for a person. When the person who needs the data lives in Excel or Google Sheets, the array of objects has to become rows and columns first, and the conversion is where records quietly lose fields if the tool guesses at the shape.

The free JSON to CSV Converter on Ovatly turns a JSON array of objects into a spreadsheet-ready CSV file, in your browser, with predictable rules for the awkward cases: nested objects, keys that only some records have, and arrays sitting inside records. This guide walks through the conversion and, just as important, how to read the result so the empty cells and dotted column names make sense.

Contents

  • Quick answer
  • Nested objects become dot-style columns
  • The union of keys rule, and why empty cells are correct
  • What lands in a cell when a value is an array
  • How to convert JSON to CSV, step by step
  • Worked example: two records with a nested object
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion
  • References

Quick answer

To convert JSON to CSV, paste a JSON array of objects into the JSON to CSV Converter, or upload a .json file, and press Convert to CSV. Check the record and column counts above the result, then copy the CSV or download it as converted.csv and open it in Excel or Google Sheets. Nested objects are flattened into dot-style columns such as address.city. The columns are the union of all keys across every record, in the order they first appear, so a key that only one record has still gets a column, and the other rows leave that cell empty. Nothing is uploaded; the conversion runs in your browser.

Nested objects become dot-style columns

Real records are rarely flat. An address is an object inside the record, not a single value, and a spreadsheet cell cannot hold an object. The converter's answer is flattening: the nested keys are promoted into columns named with dot notation, so an address object with a city key becomes an address.city column, sitting alongside the top-level columns.

Flattening keeps the conversion predictable when records have different shapes. Nothing nested is dropped, and nothing is dumped into one unreadable cell as raw text. When you open the CSV, read a dotted column name as a path: address.city is the city inside the address object of that record.

The union of keys rule, and why empty cells are correct

A CSV table has one set of columns for every row, but JSON records are under no obligation to share keys. One record has an age, the next does not. The converter resolves this by taking the union of all keys across every record, in the order they first appear. Every key anyone has becomes a column; a record that lacks a key leaves that cell empty.

This is the behaviour that most often gets reported as a bug, and it is the opposite. A mostly-empty column is the honest picture of uneven data: the key exists, most records simply do not carry it. The alternatives are worse. Dropping keys that are not universal would silently delete data, and inventing values for missing keys would fabricate it. If a column surprises you, the record and column counts above the result are the first check: they tell you how many records went in and how many columns the union produced.

What lands in a cell when a value is an array

Arrays inside records get two treatments, depending on what they hold. An array of simple values, numbers or strings, is joined with "; " into a single cell, so a list of tags reads as one tidy entry. An array containing objects cannot be flattened that way without losing structure, so it is written as JSON text in the cell: compact, complete, and available if you need to process it further, rather than silently truncated.

A single JSON object, pasted on its own, is treated as a one-row table. Scalars and mixed arrays are rejected with an explanation, because they have no clear columns to convert into.

How to convert JSON to CSV, step by step

  1. Open the JSON to CSV Converter and paste a JSON array of objects, or upload a .json file.
  2. Press Convert to CSV.
  3. Check the record and column counts above the result against what you expected from the input.
  4. Copy the CSV or download it as converted.csv, then open the file in Excel or Google Sheets.

Worked example: two records with a nested object

Take this input, two records where only the second has an age:

[
  {"name": "Ana", "address": {"city": "Lisbon"}},
  {"name": "Ben", "address": {"city": "Porto"}, "age": 31}
]

The conversion produces:

name,address.city,age
Ana,Lisbon,
Ben,Porto,31

Every rule from the sections above is visible in three lines. The nested address object became the address.city column. The age column exists because Ben has one, and Ana's age cell is empty because her record never carried the key; the converter did not invent a value for her. The column order follows first appearance: name and address.city from Ana's record, then age when Ben's record introduces it.

Limitations and honest tradeoffs

The input has to be an array of objects, or a single object. Scalars and mixed arrays are rejected with an explanation, because there is no honest set of columns for them. If your JSON is a bare list of numbers, it belongs in a different shape before it belongs in a spreadsheet.

All values are written as they appear in the JSON; no dates or numbers are reformatted. A date stays in whatever format the source used, and a number keeps its written form. That predictability is deliberate, but it means any cleanup of formats is work you do in the spreadsheet afterwards, not something the converter quietly does for you.

Common mistakes

  • Expecting every record to have every column filled. Records differ. Empty cells are the union rule working as designed, not missing data.
  • Pasting a single value or a mixed array. A number, a string, or a list mixing objects and scalars has no columns. Wrap records as objects in an array first.
  • Assuming nested data was lost. Look for the dot-style columns before concluding a field vanished; nested keys are promoted, not dropped.
  • Expecting the converter to tidy dates or numbers. It writes values as they appear. Format them in the spreadsheet if they need to change.
  • Skipping the counts check. The record and column counts above the result catch a truncated paste or an unexpected shape before the file reaches anyone else.

FAQs

Why did a column appear that most rows leave empty? The column list is the union of keys across every record. A key present in only one record still gets a column, and the other rows leave it blank.

Can it convert a JSON object instead of an array? Yes. A single object becomes a CSV with one data row.

How are nested objects handled? They are flattened into dot-style columns, so an address object with a city key becomes an address.city column.

How are arrays inside records handled? Arrays of numbers or strings are joined with '; '. Arrays of objects are stored as compact JSON text in the cell so no data is lost.

Is my JSON uploaded? No. The conversion runs in your browser; the download is generated on your device.

Conclusion

Converting JSON to CSV is a shape change, and the JSON to CSV Converter makes it with rules you can predict: dot-style columns for nested objects, the union of keys for uneven records, and values written exactly as they appear. If your JSON will not parse in the first place, our guide to formatting and validating JSON online covers fixing it before you convert. For more guides in this series, see our Data and JSON Tools guides.

References