Skip to content

JSON to CSV Converter

Convert JSON to CSV rows you can open in Excel or Google Sheets, with nested objects split into their own columns.

Input · JSON
⇄
Output · CSV

4 rows, 5 columns.

Valid JSONRuns in your browser

Load from a URL

Your browser fetches it directly, so the server must allow cross-origin requests (CORS).

How to convert JSON to CSV

  1. Paste JSON or open a file. The CSV updates as you type.
  2. Pick a Delimiter (Comma, Semicolon, Tab or Pipe). Flatten nested splits nested objects into columns.
  3. 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 note comes last. A missing key or null gives an empty cell.
  • Nested objects. Flattened, contact becomes contact.email and contact.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.

Questions

Does it accept JSON Lines (NDJSON)?

Not as is: JSON Lines holds one object per line, which is several JSON values. Wrap the lines in square brackets with a comma after each object.

Can I get an Excel file instead of CSV?

Open the downloaded CSV in Excel and save it as .xlsx. There is no direct XLSX export.

Is my data uploaded?

No. The conversion runs in your browser, so customer lists and exports never reach a server.

Related tools

Esc