Text & Data Tools011

JSON to CSV Converter

Turn an API response or a JSON export into a spreadsheet-ready CSV file, nested fields included.

or drop a file on the input
Delimiter

Paste JSON, open a file or load the sample

Processed locally · 0 bytes sent

How to convert JSON to CSV

  1. Paste your JSON into the Input box, click Open file to pick a .json file, or drop the file onto the box. Load sample fills in an example.
  2. Choose the delimiter: Comma for most tools, Semicolon for Excel in locales that use a decimal comma, or Tab.
  3. Check the result in the Output box and the preview table, which shows the first 50 rows. If the JSON is invalid, an error names the line and column to fix.
  4. Click Copy to put the CSV on your clipboard, or Download .csv to save it as a file.

Why use this tool

  • API responses into a spreadsheet

    REST APIs return arrays of JSON objects, often with nested fields such as an address or a plan. Paste the response and get one row per object, with nested fields in their own columns, ready for Excel, Google Sheets or Numbers.

  • Exports for people who do not read JSON

    Product catalogues, user lists and analytics exports often come out of a system as JSON. A CSV opens in any spreadsheet, so colleagues can sort, filter and comment without touching a code editor.

  • Imports into tools that take CSV only

    Mailing tools, CRMs and many database import screens accept CSV but not JSON. Convert first, then map the columns in the import screen.

  • Quick checks on a JSON file

    The preview table shows which keys exist and where values are missing. Gaps show up as empty cells, which is often faster to scan than the raw JSON.

Private by design

Whatever you paste or drop here is parsed in this browser tab and never uploaded, so exports holding customer records, tokens or internal URLs stay on your device. No account needed.

Good to know

What the input can be. An array of objects gives one CSV row per object. A single object gives one row. Anything else, such as an array of numbers or a plain string, is rejected with a message saying what was found instead.

How columns are built. The header row is every key that appears in any object, in the order the keys are first seen. When an object lacks a key, its cell is left empty.

  • Nested objects are flattened with dots: {"address": {"city": "Lisbon"}} becomes a column named address.city. An empty object gives an empty cell. If a key that already contains a dot collides with a flattened name, the later value wins.
  • Arrays are written as JSON text in a single cell, for example ["admin","beta"].
  • null becomes an empty cell. true and false are written as text.
  • Numbers are written as your browser reads them. Integers above 9,007,199,254,740,991 can lose precision, because JSON numbers are read as double-precision floats. Keep long IDs as strings in the JSON if you need them exact.

Quoting and line endings. The output follows RFC 4180. A cell is wrapped in double quotes when it contains the delimiter, a double quote or a line break, and quotes inside it are doubled (" becomes ""). Rows end with CRLF, the line ending the RFC specifies. The downloaded file ends with one final line break.

Errors. Invalid JSON shows an error with the line and column of the first problem, such as a missing comma or a trailing comma before ]. The message is the same in every browser.

Example

In — JSON array with nested fields

[
  { "id": 1, "name": "Ana", "address": { "city": "Lisbon" }, "tags": ["admin", "beta"] },
  { "id": 2, "name": "Bo, Jr.", "address": { "city": "Porto" }, "active": false }
]

Out — CSV, comma delimiter

id,name,address.city,tags,active
1,Ana,Lisbon,"[""admin"",""beta""]",
2,"Bo, Jr.",Porto,,false

Frequently asked questions

How are nested JSON objects converted to CSV?

Each nested field gets its own column, named by joining the keys with dots. {"user": {"address": {"city": "Lisbon"}}} becomes a column called user.address.city with the value Lisbon. Arrays are not split into columns; they are kept as JSON text in one cell.

What happens when objects have different keys?

The CSV gets one column for every key found in any object, in the order the keys first appear. Objects that lack a key get an empty cell in that column, so no data is dropped.

Should I choose comma or semicolon?

Comma is the standard and works with Google Sheets, databases and most import screens. Excel uses your system list separator when you double-click a CSV file, and in many European locales that is a semicolon, so pick Semicolon there or the whole row lands in one column.

Why do accented letters look wrong when I open the CSV in Excel?

The file is saved as UTF-8 without a byte order mark, and Excel may read such a file in an older encoding when you double-click it. Import it with Data › From Text/CSV and choose UTF-8 (65001) as the file origin, or open it in Google Sheets, which reads UTF-8 directly.

Why is my JSON rejected?

Either the text is not valid JSON, in which case the error shows the line and column to fix, or it is valid JSON of the wrong shape. The converter needs an object or an array of objects; an array of plain values such as [1, 2, 3] has no column names to use.