How to convert JSON to CSV
- Paste JSON or open a file. The CSV updates as you type.
- Pick a Delimiter (Comma, Semicolon, Tab or Pipe). Flatten nested splits nested objects into columns.
- Download the CSV for a spreadsheet, or press ⇄ to open it in CSV to JSON.
Example: an API response
Paste the whole response, wrapper included:
{
"page": 1,
"results": [
{ "id": "u_81", "name": "Hana Sato", "contact": { "email": "hana@example.com", "phone": "+81 3 5555 0101" }, "tags": ["admin", "beta"] },
{ "id": "u_82", "name": "Omar Haddad", "contact": { "email": "omar@example.com" }, "tags": [], "note": "joined, then left" }
]
}
id,name,contact.email,contact.phone,tags,note
u_81,Hana Sato,hana@example.com,+81 3 5555 0101,"[""admin"",""beta""]",
u_82,Omar Haddad,omar@example.com,,[],"joined, then left"
The note under the output reads Used the array at results (2 rows).
How rows and columns are built
- Rows. A top-level array is used as is. In an object, the first property holding an array of objects is used, one level deeper if needed (
data.orders), and the note names the path. Otherwise the object becomes one row. For rows nested deeper, extract them with the JSONPath tester first. - Columns. Every key from every row, in the order keys first appear, which is why
notecomes last. A missing key ornullgives an empty cell. - Nested objects. Flattened,
contactbecomescontact.emailandcontact.phone; unflattened, the object goes into one cell as JSON text. - Arrays inside a row are written as JSON text, like
["admin","beta"]. - Quoting. Values containing the delimiter, a double quote or a line break are wrapped in double quotes, with inner quotes doubled.
Opening it in Excel
Excel splits CSV on the list separator from your regional settings, a semicolon in many European locales. If everything lands in column A, convert again with Semicolon. To check the data as a table first, use JSON to table.