Convert JSON to CSV

This free converter turns JSON or JSON Lines into a CSV table for Excel or Google Sheets, finding the list of records and flattening nested fields into columns with dotted names. The file is converted in your browser and not uploaded. Lists of records inside a record are written as JSON text in one cell, and a file with a JSON syntax error cannot be read.

Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.

Key facts

Why turn JSON into a CSV table

Exports from web APIs, apps, online shops and log systems often arrive as JSON: fine for programs, hard to read for people. A CSV table opens in Excel or Google Sheets, where you can sort, filter and sum. This converter finds the list of records in the file, also when it sits inside a wrapper such as "data", "results" or "items", and makes one row per record and one column per field. Nested fields become columns with dotted names, so the city in an address becomes address.city. Lists inside a record, such as tags, are written as JSON text or, if you prefer, as values separated by semicolons. Records do not need the same fields: every field that appears anywhere becomes a column, in the order it first appears, and missing values stay empty. JSON Lines files (.jsonl, .ndjson) with one record per line work too, and the preview shows the first rows before you download.

How to convert JSON to CSV

  1. Drop your .json, .jsonl or .ndjson file in the box, or click to choose it.
  2. Check the columns in the preview and choose how lists and the CSV style should look.
  3. Click Convert to CSV and download the file.

What changes when you convert

Which list becomes the table

If the file is a list, each item becomes a row. If it is an object, the tool uses the longest list of records it finds, up to two levels down, and shows its name (for example "data.items") in the summary. An object without such a list becomes a single row.

Deeply nested data

Nested objects are opened up to ten levels deep, and each value gets its own column. A record that holds a list of other records, such as the order lines of an order, is written as JSON text in one cell, because a flat table has no good place for it.

Invalid JSON

A missing comma or quote makes the whole file unreadable. The tool tells you where the error is when the browser reports a line and column. Files that are cut off, for example a log that was still being written, are a common cause.

GeoJSON is map data

A GeoJSON file holds coordinates as well as attributes. Use GeoJSON to CSV instead, which writes the coordinates as X and Y columns or as WKT.

About the formats

JSON

JSON (JavaScript Object Notation) is the text format most web APIs, apps and configuration files use for data. Values can be nested: a record can hold another record or a list, which a flat table cannot.

  • Objects hold named values, lists hold values in order; both can be nested to any depth.
  • Values are text, numbers, true/false or null, so a postcode written as "0150" stays text.
  • JSON Lines (.jsonl, .ndjson) puts one JSON object on each line, common in logs and data exports.
  • Text is always Unicode, normally UTF-8.

CSV

CSV (comma-separated values) is a plain-text table: one line per row, with the cells separated by a comma, a semicolon or a tab. Excel, Google Sheets, Numbers, every database and most programming languages read and write it, which makes it the usual way to move a table from one program to another.

  • There is no standard for the separator: Excel uses a comma or a semicolon depending on the language settings.
  • Every value is text; whether 0800 is a number or a postcode is up to the program reading it.
  • There are no sheets, formulas, colours or column widths, only the values.
  • The encoding is not stored in the file; UTF-8 is the safe choice, and Excel needs a BOM to recognise it.

Frequently asked questions

Is my JSON file uploaded?

No. The file is read and converted by your browser on your own device. API exports with personal data or access tokens never leave your computer.

Will Excel show special characters correctly?

Choose one of the Excel styles. They add a byte order mark, so Excel reads the file as UTF-8 and shows letters such as ø, é and ü correctly.

How are true, false and null written?

true and false are written as the words true and false, and null as an empty cell. Numbers are written as they are in the JSON, with a decimal comma in the Excel in Europe style.

What is the largest file that works?

Up to 200 MB. The whole file is read into memory, so files with millions of records are better converted on a computer than on a phone.