JSON to CSV converter

CSV (comma-separated values) is a plain-text table in which each line is a row and a delimiter separates the columns; converting JSON to CSV turns each object in an array into one row.

Convert a JSON array to CSV with nested objects flattened into dot-path columns, and a comma, semicolon or tab delimiter. Free and runs in your browser.

Browser-sideNo accountCopy, download, or print

Last reviewed

Your inputs are saved as a draft in this browser only. Nothing is uploaded.

Jump to result
Interactive workspace

Inputs

Up to 200,000 characters and 10,000 rows.

Result

More export options

Rows4
Columns6
OutputCSV (comma)

Preview: first 4 of 4 rows

idnameemailaddress.cityaddress.countryactive
C-1001Acme Trading Ltdaccounts@acme.exampleLeedsGBtrue
C-1002Example Retail, Inc.ap@example-retail.exampleAustinUStrue
C-1003Muster Handel GmbHbuchhaltung@muster.exampleBerlinDEfalse
C-1004Gulf Supplies LLCfinance@gulf.exampleDubaiAEtrue
id,name,email,address.city,address.country,active
C-1001,Acme Trading Ltd,accounts@acme.example,Leeds,GB,true
C-1002,"Example Retail, Inc.",ap@example-retail.example,Austin,US,true
C-1003,Muster Handel GmbH,buchhaltung@muster.example,Berlin,DE,false
C-1004,Gulf Supplies LLC,finance@gulf.example,Dubai,AE,true

Examples

An array of objects

[{"id":1,"name":"Acme"},{"id":2,"name":"Globex"}] becomes a header row id,name and one row per object: 1,Acme and 2,Globex.

Nested objects

With Flatten on, {"id":1,"address":{"city":"Leeds"}} becomes the columns id and address.city. With Flatten off, the address cell holds the JSON text {"city":"Leeds"}.

Objects with different keys

Every key that appears in any object becomes a column. An object without that key gets an empty cell.

Commas inside values

A value such as Acme, Inc. is written in double quotes, "Acme, Inc.", so the comma is not read as a column break. Quotes inside a value are doubled.

Semicolons for European Excel

Excel set to a language that uses the decimal comma, as in Germany or France, expects semicolon-separated files. Choose Semicolon so the columns open correctly.

How to use it

  1. Paste a JSON array of objects, or a single object.
  2. Choose the delimiter, whether to include a header row, and whether to flatten nested objects.
  3. Check the table preview and any notes about the conversion.
  4. Copy the CSV or download it.

Questions

How are nested objects converted?
With Flatten on, each nested value gets its own column named by its path, such as address.city. With Flatten off, the nested object is written into one cell as JSON text.
What happens to arrays inside an object?
An array value is written into its cell as JSON text, such as ["a","b"], because a list does not map to a single column.
How are commas, quotes and line breaks in values handled?
Following RFC 4180, a value that contains the delimiter, a double quote or a line break is wrapped in double quotes, and any double quote inside it is doubled.
Why does my CSV open in a single column in Excel?
Excel in many European languages expects a semicolon delimiter. Choose Semicolon, or import the file with Excel's text import and pick the delimiter there.
How large a file can I convert?
Up to 200,000 characters and 10,000 rows. For larger files, split the array first.
Is my data uploaded?
No. The conversion runs entirely in your browser and nothing is uploaded.