Convert JSON to CSV

An array of uniform JSON objects becomes a CSV table, with the keys of the first record as the header.

Convert JSON to CSV to lay an array of uniform objects out as a table. The keys of the first record become the column headers, and every record after it becomes a row.

What happens when you convert JSON to CSV

JSON describes data as a tree: an object can hold another object, and next to it an array of any depth. A table cannot do that: it has rows and columns and nothing else.

So the conversion expects a flat list on input: an array of objects sharing the same set of fields. Such a list maps into a table one to one and opens in Excel or Google Sheets with no further work.

  • The keys of the first object become the header row.
  • Each object in the array turns into its own row.
  • Nested objects and arrays are not spread into columns, so flatten them beforehand.
  • Records with a different set of fields shift their values out of line with the header.
  • A file with a syntax error is not converted: the job ends in failure.

How to convert JSON to CSV

  1. Upload your JSON file on this page.
  2. Pick CSV as the output format.
  3. Click “Convert”.
  4. Download the table.

Where this JSON usually comes from

  • Export an API response and show the data to a colleague who lives in Excel.
  • Load a list of products or contacts into a CRM that only accepts tables.
  • Work out statistics from a database export with formulas instead of code.
  • Merge data from several sources into one file for a report.

Check the structure before uploading

  1. Make sure the file holds an array of objects rather than a single object.
  2. Compare the keys of the first and the last record: they should match.
  3. Flatten the nesting, turning user.name into a top-level field of its own.
  4. Run the file through any JSON validator, since a syntax error stops the conversion.

Limits

  • File size: up to 50 MB as a guest, up to 100 MB with a free account.
  • The delimiter in the result is a comma.

Other directions for JSON

FAQ

What happens to nested objects?

They are not spread into separate columns. Flatten the data before uploading, or the cell will hold an unusable value.

Why did the conversion fail?

Usually the structure is to blame: the file holds a single object instead of an array, or it contains a syntax error. Validate the JSON and upload it again.

Where do the column headers come from?

From the keys of the first object in the array. If later records carry different fields, their values land under the wrong headers.

Which delimiter is used?

A comma. Values containing commas are quoted according to the CSV rules.

More about the formats

What the format is, how to open it and how it differs from the others.