json.cihat.dev

JSON to CSV converter

Convert JSON to CSV online: paste an array of records and get a table, with nested fields flattened into their own columns and a download that opens cleanly in Excel. Nothing leaves your browser.

Nested objects and arrays

How to use it

  1. Paste a JSON array, or open a .json file. An object that holds an array, like an API response with data or items, works too.
  2. Choose the delimiter. Excel in many European locales, Turkey included, expects a semicolon.
  3. Choose how nested values are written: flattened into columns such as address.city, or kept as JSON text in one column.
  4. Check the table preview, then copy the CSV or download it. Tick Excel-ready so accented letters open correctly in Excel.

How records become rows

Each item in the array is one row. The columns are every key that appears in any record, in the order they first appear, so a key missing from some records leaves those cells empty instead of shifting the table. If you paste an object, the converter looks for the first array of records inside it and says which path it used.

With Flatten to columns, {"address": {"city": "Izmir"}} becomes a column named address.city, and arrays get numbered columns such as tags.0 and tags.1. null becomes an empty cell, true and false stay as words, and numbers keep the exact digits you wrote, so long IDs are not rounded.

A worked example

Two customer records, the second with a comma in the name, no postcode and no tags:

[{"id": 1, "name": "Ayşe", "address": {"city": "İzmir", "zip": "35210"}, "tags": ["new", "vip"]}, {"id": 2, "name": "Can, Jr.", "address": {"city": "Ankara"}, "tags": []}]

Flattened with a comma delimiter, they give six columns, taken from the first record:

idnameaddress.cityaddress.ziptags.0tags.1
1Ayşeİzmir35210newvip
2"Can, Jr."Ankara

Quoting, the RFC 4180 way

CSV has no single official standard, but RFC 4180 (October 2005) documents the format most programs follow, and this converter writes it. A field is wrapped in double quotes when it contains the delimiter, a double quote or a line break, and a quote inside a field is written twice. Records are separated by CRLF line breaks. That is why Can, Jr. above is written "Can, Jr.", and why, with Keep as JSON text, the tags column holds "[""new"",""vip""]". Cells that start or end with a space are quoted too, so the space survives.

To read such a file back into JSON, including quoted commas and line breaks inside cells, use CSV to JSON. To sort and filter the table first, open it in the CSV viewer.

Opening the file in Excel

Excel reads a CSV file as the local Windows code page unless the file starts with a byte order mark. The Excel-ready option adds that mark to the download, so names such as Çağrı or José keep their letters. If your Excel uses a comma as the decimal separator, as Turkish Excel does, pick the semicolon delimiter as well.

Excel also converts what looks like a number when it opens a CSV. Microsoft documents that Excel keeps at most 15 significant digits, so a 19-digit ID shows in scientific notation and loses every digit after the fifteenth, and that leading zeros are dropped, so a postcode such as 06690 becomes 6690. The CSV file itself is still correct. To keep those columns as text, import the file through Excel’s Data › From Text/CSV and set the column type to Text.

Excel limit (Microsoft)Value
Rows per worksheet1,048,576
Columns per worksheet16,384
Characters in one cell32,767
Number precision15 digits

Questions people ask

Is my data uploaded?

No. The conversion runs in your browser and nothing is sent to a server.

How do I convert a JSON file to Excel?

Open the file here, pick the semicolon delimiter if your Excel uses a decimal comma, tick Excel-ready and download the CSV. Excel opens it directly; save it from Excel as .xlsx if you need a workbook.

Can it convert nested JSON?

Yes. Nested objects are flattened into dot-named columns, and arrays into numbered columns. Or keep them as JSON text in a single column.

What if my records have different keys?

Every key gets a column. A record without a key has an empty cell in that column.

Why do my long IDs look wrong in Excel?

The CSV holds every digit, but Excel keeps only 15 significant digits when it reads a number. Import the column as Text through Data › From Text/CSV to keep them.

How large a file can it convert?

Files up to 64 MB open. Above 200 KB the JSON is parsed in a background thread; the preview shows the first 50 rows and the download holds all of them.