Skip to content

JSON to CSV

Convert JSON array to CSV.

Loading…

About JSON to CSV

An API response is easy to read and awkward to open in a spreadsheet. Paste a JSON array of objects and the tool builds a header row from every key it meets, in the order first seen, then writes one line per object, leaving a blank cell where an object lacks a key. Values with commas, quotes or line breaks are quoted. Nested objects and arrays are not split into extra columns; each one is written as JSON text inside its cell.

Features

  • Header row built from every key across all objects
  • Blank cells where an object is missing a key
  • Fields with commas, quotes or line breaks are quoted
  • Nested objects and arrays kept as JSON text in a single cell
  • Numbers keep their exact written form, such as 1.10 or very long integers
  • Text starting with =, +, - or @ gets an apostrophe in front so spreadsheets do not run it as a formula

Limitations

  • The top level must be a non-empty array of objects. A single object, an array of plain values or an empty array is rejected with a message that says why.
  • Nested data is not flattened into dotted column names, so a cell may hold JSON text that you parse again later.
  • Fields are always separated by commas, and JSON nested more than 1,000 levels deep is refused.
  • Download saves the text as output.txt and needs a free account; Copy Output does not.

How it works

  1. Paste a JSON array of objects into the JSON Array panel.
  2. Select Convert to CSV.
  3. Read the result in the CSV Output panel, with the header row first.
  4. Use Copy Output to put the CSV on your clipboard, or Download to save it as a file.
  5. Press Clear All to start again with new JSON.

Example input

[
  {"name": "Auro", "role": "admin"},
  {"name": "Nova", "role": "editor"}
]

Frequently asked questions