My Tool Studio
Developer

JSON to CSV Converter

This JSON to CSV converter turns a JSON array of objects into rows, with the keys as column headers, so the data opens straight in Excel, Google Sheets or Numbers. Nested objects are flattened into dot-notation columns such as address.city, and arrays can stay as JSON text, be joined into one cell or be split into numbered columns. Choose a comma, semicolon, tab, pipe or custom delimiter, switch the header row, quoting and line endings, and untick columns you do not need. A table preview shows the result before you download it as .csv or as an Excel .xlsx file. Paste JSON or JSON Lines, drop or upload a file, or load one from a URL. It runs in your browser.

Always freeNo sign upRuns in your browser
CSV appears here.

How to use

01

Add your JSON

Paste a JSON array of objects, drop or upload a .json or .jsonl file, or press Load URL. A single object, a {"data": [...]} wrapper and one-object-per-line JSON Lines also work. Try sample loads two nested records.

02

Set the options and convert

Pick the delimiter, header row, flattening and array handling, then press Convert to CSV. If your records sit deeper, type their path, such as data.items, in Array path and press Apply path.

03

Check, trim and download

Open Table preview to check the rows, untick unwanted columns under Choose columns, then press .csv or .xlsx to download, or Copy to paste the CSV somewhere.

Why JSON to CSV Converter

Example: nested JSON flattened to CSV columns

The sample on this page has two customer records. Each has an id, a name, an address object with a city and zip, and one of them has a tags array while the other has an active flag. The table shows how each value is placed in the CSV.

The resulting header row is id,name,address.city,address.zip,tags,active. The second record has no tags, so that cell is empty. The first has no active key, so its active cell is empty. The name Bob, Jr. contains a comma, so it is written as "Bob, Jr." in the file.

JSON valueCSV columnCell
"id": 1id1
"address": {"city": "Lisbon"}address.cityLisbon
"address": {"zip": "1100-148"}address.zip1100-148
"tags": ["admin", "beta"]tags["admin","beta"]
"active": false (second record only)activefalse, and empty for the first record
"name": "Bob, Jr."name"Bob, Jr." (quoted because of the comma)

Array options: one cell, joined values or one column per item

Arrays have no natural place in a flat table, so the Arrays menu decides how they are written. The table uses the sample's tags array, ["admin", "beta"].

Arrays settingColumnsCell values
Keep as JSON texttags["admin","beta"]
Join values with ;tagsadmin; beta
One column per itemtags.0, tags.1admin and beta

Common questions

How are nested JSON objects converted to CSV columns?
With Flatten nested objects ticked, each nested key is joined to its parent with a dot, so {"address": {"city": "Leeds"}} becomes a column named address.city. Untick it to keep each nested object as JSON text in one cell. Arrays follow the Arrays setting: JSON text such as ["admin","beta"], values joined with semicolons, or one column per item such as tags.0 and tags.1.
Can I convert JSON to Excel directly?
Yes. After converting, press .xlsx to download an Excel workbook with the same columns, a filter on the header row and fitted column widths. Numbers and true or false stay real values, so Excel can sort and sum them. The JSON to Excel tool adds one sheet per list and .xls or .ods output.
How do I convert a large JSON file to CSV?
Paste it into the JSON box; the conversion runs in your browser, so the practical limit is your device's memory. Very large files can make the tab slow. For those, a short script works well, for example pandas.json_normalize followed by to_csv in Python.
Why do some CSV cells have quotes around them?
That is standard CSV escaping. A value that contains a comma, a double quote or a line break is wrapped in double quotes, and any quote inside it is doubled. Spreadsheets remove these quotes when they open the file, so Bob, Jr. shows up as one cell.
Can I choose a semicolon delimiter for European Excel?
Yes. Pick Semicolon in the Delimiter menu, which suits Excel in locales that use a comma as the decimal separator. Tab, pipe and a custom delimiter of up to three characters are also available. Choosing Tab downloads a .tsv file.
What happens to JSON keys that only some records have?
They still get a column. Columns are added in the order keys are first seen across all records, and rows without that key get an empty cell.
Which JSON shapes does the JSON to CSV converter accept?
An array of objects gives one row per object, and a single object gives one row. An object with exactly one key that holds an array, like {"data": [...]}, uses that array. For deeper data, type a path such as results.items in Array path. JSON Lines, one object per line, is read automatically. An array of plain values gives one column named value.
How are true, false and null written in the CSV?
True and false are written as the words true and false, numbers are written as they are, and null becomes an empty cell. Empty objects are written as {}. Tick Quote every value if the program that reads the file needs every field in double quotes.
Can I turn the CSV back into JSON?
Yes, with the CSV to JSON Converter. Set its Nested keys option to Split on . and dotted headers such as address.city come back as nested objects.
How do I leave columns out of the JSON to CSV output?
Convert first, then open Choose columns under the panes. Untick any column and the CSV, the table preview and the .xlsx download update at once. All and None select or clear every column.

More Developer tools

View all