JSON to CSV Converter

Turn a JSON array of objects into a spreadsheet. Nested fields can be flattened with dotted keys.

From JSON objects to a sheet

Spreadsheets want a rectangle: one header row and one value per cell. JSON is often nested. This page accepts an array of objects, a single object, or an array of arrays. Nested objects are either written as a JSON string in one cell, or flattened into dotted keys when you ask for that.

How to use it

  1. Paste JSON. A single object becomes one data row. An array of objects becomes one row each. Keys are united, so a field that appears only on the second object still gets a column.
  2. Choose the delimiter your spreadsheet expects. Semicolon is safer in locales where Excel uses comma as a decimal point.
  3. Turn on “Flatten nested objects” when you want author.name instead of a JSON blob in the author cell. Arrays become tags[0], tags[1].
  4. Fields that contain the delimiter, a quote, or a line break are quoted. Quotes inside a field are doubled, which is what Excel reads back.
  5. The other direction is CSV to JSON. For config files, JSON to YAML is usually a better fit than CSV.

Questions

Why did I get “should be an array of objects”?

A JSON string, a bare number, or a top-level array of mixed shapes is not a table. Wrap records in an array, or pass one object.

Numbers lost their type.

CSV has no types. true becomes the text true, and null becomes an empty cell. That is what a sheet can store.