Skip to content
MoneyDeck

JSON to CSV Converter

Turn a JSON array into a spreadsheet-ready CSV with nested keys flattened

Updated · Free, no signup

An array of objects, a single object, or an object wrapping one array.

CSV output

id,name,email,address.city,address.zip,tags,active,plan
1,Alice Chen,[email protected],Austin,78701,"[""admin"",""beta""]",true,
2,"Bob Smith, Jr.",[email protected],Denver,80202,[],false,
3,"Carla ""CJ"" Diaz",,Miami,,,true,pro

Data rows

3

Columns

8

Column names

id, name, email, address.city, address.zip, tags, active, plan

Status

OK
  • 3 of 3 rows are missing at least one column — those cells are left empty.
  • Nested objects were flattened into dot-notation columns.

Preview (first 20 rows)

idnameemailaddress.cityaddress.ziptagsactiveplan
1Alice Chen[email protected]Austin78701["admin","beta"]true
2Bob Smith, Jr.[email protected]Denver80202[]false
3Carla "CJ" DiazMiamitruepro

About the JSON to CSV Converter

This JSON to CSV converter turns an array of JSON objects — the typical shape of an API response, database export or log file — into comma-separated values you can open in Excel, Google Sheets, Numbers or any BI tool. Every distinct key becomes a column, in the order it first appears, and rows missing a key simply get an empty cell.

Nested objects are flattened into dot-notation columns, so {"address": {"city": "Austin"}} becomes an address.city column. Arrays are kept intact as compact JSON in a single cell so no data is lost. If you paste a single object, it becomes one row; if you paste an object that wraps an array (such as {"data": [...]}), the array is used automatically.

Values that contain the delimiter, quotes or line breaks are quoted and escaped following RFC 4180, the CSV standard. Choose a semicolon delimiter for Excel in locales that use a comma as the decimal separator, or tab for TSV. Everything runs in your browser, so your data is never uploaded.

How to use the json to csv converter

  1. 1Paste a JSON array of objects (or an API response containing one).
  2. 2Choose a delimiter — comma for most apps, semicolon for European Excel, tab for TSV.
  3. 3Decide whether to flatten nested objects and include a header row.
  4. 4Check the preview table, then copy the CSV or paste it into a spreadsheet.

Formula and method

columns = ordered union of (flattened) keys · cell = quote(value) if it contains delimiter, " or newline

Each object is flattened: nested objects contribute keys joined with dots (address.city), arrays are serialised as compact JSON, null becomes an empty cell, and booleans and numbers are written as text. The header is the union of all keys in the order they are first seen, so irregular records still line up.

Following RFC 4180, any field containing the delimiter, a double quote, a carriage return or a line feed is wrapped in double quotes, and embedded double quotes are doubled ("" ). Rows are separated with a line feed.

Worked examples

Users with nested address and tags

The address object becomes address.city and address.zip columns, and "plan", which only appears in the last record, is added as the eighth column. "Bob Smith, Jr." contains a comma and "Carla "CJ" Diaz" contains quotes, so both are quoted with inner quotes doubled; the null email is an empty cell.

API response wrapper, semicolon delimiter

The wrapping object holds one array, so its two records are converted. With a semicolon delimiter, Excel in comma-decimal locales opens the file directly into three columns.

Invalid JSON is reported

A trailing comma is not allowed in JSON, so the converter reports a parse error instead of producing broken CSV.

Frequently asked questions

How do I convert JSON to CSV?+

Paste a JSON array of objects into the input. Each object becomes a row and each key becomes a column; nested objects are flattened into dot-notation columns. Copy the CSV output or save it as a .csv file to open in Excel or Sheets.

How are nested JSON objects handled?+

With flattening on, {"address": {"city": "Austin"}} becomes a column named address.city. With flattening off, the whole nested object is written as JSON text inside one cell. Arrays are always kept as JSON text so nothing is lost.

Why does Excel put everything in one column?+

In many European locales Excel expects semicolons because the comma is the decimal separator. Choose the semicolon delimiter, or use Data → From Text/CSV in Excel and pick the comma delimiter explicitly.

What happens when objects have different keys?+

The converter collects every key from every object, in the order first seen, to build the header. Records that do not have a particular key get an empty cell in that column, so rows always stay aligned.

Is my data uploaded anywhere?+

No. The conversion runs entirely in your browser with JavaScript, so the JSON you paste is never sent to a server — useful for customer exports or other confidential data.

Related tools