Saved

Press the star next to a tool's name to save it.

All my tools

JSON to CSV Converter

Paste JSON and this JSON to CSV converter turns it into a CSV table for Excel or Google Sheets, flattening nested objects into their own columns.

Each object becomes a row and each field a column. Arrays of values are joined with "; " in one cell.

Converted in your browser. Your data is not uploaded.

CSV

Paste JSON to see it as CSV.

A JSON to CSV converter turns JSON data into a CSV file you can open in Excel, Google Sheets or any spreadsheet. Paste a JSON array, an object or JSON Lines, and this free online JSON to CSV converter builds one row per record and one column per field, flattens nested objects into columns such as address.city, and gives you a CSV to copy or download. The conversion runs in your browser, so your data is never uploaded.

How to use the JSON to CSV converter

  1. Paste your JSON into the box, or press Try a sample to see how it works.
  2. Choose a delimiter. Comma is standard. Pick semicolon if your spreadsheet uses a comma as the decimal separator, or tab for data that is full of commas.
  3. Decide how to handle nested objects. With Flatten nested objects on, each inner field becomes its own column. Turn it off to keep each nested object as JSON text in a single cell.
  4. Check the preview. The first ten rows appear as a table, with the number of rows and columns above it.
  5. Download the CSV or copy it to paste somewhere else.

The CSV updates as you type, so you can fix the JSON and see the result straight away. If the JSON can't be read, a message points to where the problem is.

What JSON and CSV are

JSON (JavaScript Object Notation) is an open, human-readable format for storing and sending data as name–value pairs and arrays. Its basic types are numbers, strings, true and false, arrays, objects and null. It is used widely by web applications and APIs, and the current standard is RFC 8259, which is consistent with ECMA-404.

CSV (comma-separated values) stores a table as plain text: one record per line, with fields separated by commas. RFC 4180 documents the format most programs follow. Its rules say that each line should have the same number of fields, that a field containing a comma, a double quote or a line break should be wrapped in double quotes, and that a double quote inside such a field is written twice. This converter follows those rules and uses CRLF line endings, as the RFC describes.

JSON to CSV example

Press Try a sample to load this JSON array of two people:

[{"id": 1, "name": "Asha", "email": "asha@example.com", "address": {"city": "Pune", "pin": "411001"}, "skills": ["Excel", "SQL"]}, {"id": 2, "name": "Ravi, Jr.", "email": "ravi@example.com", "address": {"city": "Delhi"}, "active": true}]

The converter produces 2 rows and 7 columns:

id,name,email,address.city,address.pin,skills,active
1,Asha,asha@example.com,Pune,411001,Excel; SQL,
2,"Ravi, Jr.",ravi@example.com,Delhi,,,true

  • The nested address object becomes two columns, address.city and address.pin.
  • The skills array becomes one cell, with the values joined by a semicolon and a space.
  • Ravi, Jr. contains a comma, so it is wrapped in double quotes.
  • Fields missing from a record, such as Ravi's PIN code and Asha's active flag, are left empty, so every line has the same number of fields.

What JSON shapes the converter accepts

  • An array of objects, the most common shape from APIs and exports. Each object becomes a row.
  • An object that wraps a list, such as {"data": [...]} or {"results": [...]}. When an object holds exactly one array of objects, that array is used as the rows.
  • A single object, which becomes one row.
  • An array of arrays, where each inner array becomes a row with numbered columns.
  • An array of plain values, which becomes a single column named value.
  • JSON Lines, with one JSON object on each line, as written by many logging and data tools.

When to convert JSON to CSV

Developers often get data from an API as JSON, but the people who need to read it work in spreadsheets. Converting JSON to CSV lets analysts sort, filter and chart the data, lets a manager review an export without any code, and makes it easy to load records into tools that only import CSV, such as many email, accounting and CRM systems.

Opening the CSV in Excel or Google Sheets

The downloaded file starts with a byte order mark, a small marker that tells Excel the file is UTF-8, so names with accents or text in other scripts show correctly. In Google Sheets, use File, Import and upload the file. If Excel puts everything into one column, your computer probably expects semicolons: convert again with the semicolon delimiter, or use the Text to Columns feature.

Common problems

  • Single quotes. JSON strings and names need double quotes. Text such as {'name': 'Asha'} is not valid JSON.
  • Trailing commas. A comma after the last item in an array or object makes JSON invalid.
  • Comments. JSON has no comments, so remove any // or /* */ notes first.
  • Very deep nesting. Flattening deeply nested data makes long column names. Turn flattening off if you only need the top-level fields.
  • Leading zeros. Spreadsheets may drop the zeros from codes such as 007. Import the column as text if they matter.

To tidy or check JSON before converting it, paste it into the JSON formatter and validator. For encoded data, the Base64 encoder and decoder turns Base64 text back into readable JSON first.

What next

Use this often? Add JSON to CSV to your Home screen.

Frequently asked questions

How do I use the JSON to CSV converter?

Paste your JSON into the box, pick a delimiter and check the preview table. Then press Download CSV or Copy CSV.

Can it convert nested JSON to CSV?

Yes. With Flatten nested objects on, each inner field becomes its own column, named with a dot path such as address.city.

Is my JSON uploaded anywhere?

No. The conversion runs in your browser, so the data stays on your device.

What happens to arrays inside a record?

An array of plain values is joined into one cell with a semicolon and a space. An array of objects is kept as JSON text in its cell.

Why does Excel show my CSV in one column?

Your Excel probably expects semicolons as the separator. Convert again with the semicolon delimiter, or use Text to Columns.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools