Skip to content

JSON to CSV Converter

Convert a JSON array of flat objects, or one object, to a CSV spreadsheet in your browser, with one column per key.

JSON to CSV Converter

Convert a JSON array of flat objects, or one object, into a spreadsheet.

Maximum file size: 25 MB per file. You can also drag files here.

Supported scope and limitations

Converts a JSON array of flat objects, or one object, into CSV. Nested objects and arrays are left blank. Nothing is uploaded.

Examples contain invented demonstration data. Replace it before using any export.

Privacy: files are processed in your browser and are never uploaded.

Convert JSON to CSV when an API, export or log gives you a list of records and you want to sort, filter or share them as a spreadsheet. This JSON to CSV converter takes an array of objects, or a single object, makes one column per key and one row per object.

How to use the JSON to CSV converter

  1. Choose a .json file whose top level is an array of objects such as [{"name":"Ada"}], or a single object.
  2. Leave Input encoding on auto.
  3. Select Process files, or press Try an example.
  4. Check the preview and download converted.csv.

How keys become columns

Columns follow the order in which keys first appear. If the first object has id and name and the second adds email, the CSV has three columns and the first row’s email cell is empty. Strings, numbers, booleans and null are written as text; null becomes an empty cell. RFC 8259, the JSON standard, allows these value types plus objects and arrays.

Nested objects and arrays do not fit in one cell, so they are left out. A key whose value is an object or array everywhere is skipped as a column, and if it holds a plain value in some rows only those cells are filled. If you need nested data, flatten it first, for example turn "address":{"city":"London"} into "address_city":"London". The CSV follows RFC 4180 quoting, so commas and quotes inside values are safe.

Worked example: two records

[{"id":1,"name":"Ada","city":"London","tags":["a"]},
 {"id":2,"name":"Grace","email":"g@example.test"}]

The JSON to CSV output has columns id, name, city and email. Ada’s row has an empty email, Grace’s row has an empty city, and tags is not a column because it is an array.

JSON to CSV example result preview
Illustrative result from this JSON to CSV converter using a fictional test file.

Getting clean results

Data inside a wrapper, such as {"data":[...]}, is read as one object, and since data is an array it is skipped. Save just the inner array instead. Cells that start with =, +, - or @ and are not plain numbers get a leading apostrophe so a spreadsheet does not run them as formulas. The JSON to CSV preview shows up to 5,000 rows, and the download contains every row.

Common JSON to CSV errors

  • The file is not valid JSON. Check for a trailing comma, single quotes or comments, none of which RFC 8259 allows. The same message appears when the top level is a list of plain values rather than objects.
  • Nothing to convert. Every value is nested, so there are no plain columns. Flatten the data first.
  • Odd characters. Choose the encoding by hand.

Privacy: your data stays in your browser

Tips before you convert

Check that the file is valid JSON first. A trailing comma or a single quote around a key will stop any parser, and the error usually points to the line. Keep each record as an object with the same keys, because the header row is built from the keys it finds. If some records hold extra fields, those columns stay blank for the others. When the data comes from an API, save the raw response as a file rather than copying it from a browser window, which can add hidden characters.

The JSON to CSV converter runs with JavaScript in a background worker on this page. The file is read into browser memory and is not uploaded, and the result you download is built locally. If the file holds anything private, such as home locations or personal records, clear the page on a shared computer when you are done.

To compare two CSV exports, use the CSV difference checker. To change a CSV’s character set, use the CSV encoding converter.

Sources

The JSON to CSV converter follows these specifications and format guides:

Questions about this tool

What JSON shape does it accept?

An array of objects, or a single object. A list of plain values such as [1,2,3] is rejected.

What happens to nested objects and arrays?

They are left out because they do not fit in one cell. Flatten them into plain keys first if you need them.

Are missing keys a problem?

No. Every key found in any object becomes a column, and missing values are empty cells.

Why do some cells start with an apostrophe?

Text that starts with =, +, - or @ and is not a plain number is prefixed so a spreadsheet does not run it as a formula.

Is my JSON uploaded?

No. It is parsed and converted in your browser.

Review the supported formats and limitations before using an output file. File processing happens in your browser.