Calci.inCalculate Today for a Better Tomorrow

JSON to CSV Converter

Nested JSON to a clean CSV for Excel or Sheets

Free, no sign-up · Reviewed

The guide

Turning JSON into CSV rows and columns

How the JSON to CSV converter decides what a row is, names columns for nested fields, handles lists inside records, picks a separator for Excel, and keeps long numbers exact.

Last reviewed · 1,449 words

In short

  • Each record in the JSON list becomes one CSV row, and each field becomes a column. Nested fields get dotted names such as customer.city.
  • A list of objects inside each record, such as the items of an order, becomes a CSV of its own, with the parent record's columns copied onto every row.
  • Choose a semicolon or tab separator if Excel opens your CSV in one column. That happens where the decimal mark is a comma.
  • It is quick. A 6.1 MB JSON file of 50,000 records became a 2.4 MB CSV in about a quarter of a second in our test.
  • Nothing is uploaded. The JSON is converted in this browser tab.

An API response, an export from an app, a log file, a report from a payment gateway: data often arrives as JSON, and the people who need to read it work in Excel or Google Sheets. CSV is the bridge. Every spreadsheet opens it, and every database can import it. The difficulty is that JSON can nest objects inside objects and lists inside records, while a CSV is one flat table. This guide explains how the converter flattens one into the other, and what to choose when your data does not fit the simple case.

How to convert JSON to CSV

  1. Paste the JSON into the box, or press Open a file and choose a .json file. JSON Lines files, with one record on each line, work too.
  2. Read the CSV on the right. It updates as you type.
  3. Copy it, or press Download .csv and open the file in Excel, Google Sheets or LibreOffice Calc.

If the JSON has a mistake, the page shows the line and column of the first one, with the line itself and a pointer under it, instead of a CSV.

What becomes a row, and what becomes a column

A CSV is a table: one header line naming the columns, then one line per row. The converter maps JSON onto that table with three rules.

A list of records is the rows. JSON that starts with [ and holds objects, such as a list of customers, gives one row per object. JSON that is an object with a list inside it, such as {"data": [...], "page": 1}, gives one row per item of that list; if there are several lists, the longest one at the top is chosen, and you can pick another.

Each field is a column. The column names come from the field names. A record that lacks a field leaves its cell empty, and a field that appears in only one record still gets a column, so no value is lost.

Nested objects become dotted columns. In {"customer": {"name": "Asha Rao", "city": "Pune"}} the name and city are one level down. They become two columns, customer.name and customer.city. Deeper nesting adds more dots.

Lists of plain values are joined. A field such as "tags": ["new", "priority"] becomes one cell, new; priority. An empty list gives an empty cell.

Reading the example

The page opens with two orders. Each has an id, a date, a customer object, a tag list, a paid flag, a total and a list of items. The converter reports two tables: the orders, with 2 rows and 9 columns, and the items, with 3 rows.

The CSV of the orders begins:

#iddatecustomer.namecustomer.citycustomer.pintagspaidtotal
11012026-11-01Asha RaoPune411001new; prioritytrue1499.5
21022026-11-02Mehta, RahulJaipur302001false2999

The # column numbers the rows. It is there because the items list refers back to it, as the next section shows.

"Mehta, Rahul" is written in quotes in the CSV text, "Mehta, Rahul", because it contains a comma, the separator. Without the quotes a spreadsheet would split the name into two cells. Quotes are added only where they are needed: around values containing the separator, a double quote, a line break, or a space at either end. A double quote inside a value is written twice, as the CSV standard requires.

Lists of records inside each record

The items of each order are themselves records, each with a SKU, a quantity and a price. Two orders have three items between them. There is no way to put three items into two rows without losing something, so the converter does not try. It makes the items a table of their own.

Choose items under Rows from, and the CSV becomes one row per item:

data #data.iddata.customer.nameskuqtyprice
1101Asha RaoTSHIRT-M2499.75
1101Asha RaoMUG-011500
2102Mehta, RahulSHOES-912999

(The real file also carries the other order columns; the table above shows a few.) Each item row carries its order's columns, so the file stands on its own: you can filter by customer or sum quantities by city without joining two files. The data # column gives the order's row number, which matches the # column of the orders CSV, if you do want to join them.

This is the same rule the JSON to Excel converter uses, where the two tables become two sheets of one workbook.

Choosing the separator

The C in CSV stands for comma, and comma is the default. But a spreadsheet does not always read commas.

Excel follows your computer's region setting. In countries where the decimal mark is a comma, such as Germany, France and much of Europe, the list separator is a semicolon, and Excel opens a comma-separated file with every row squeezed into column A. Choose Semicolon and download again.

Tab is the safest choice for text with commas and semicolons in it, such as addresses and notes. The file is then saved as .tsv, and Excel, Google Sheets and databases all read it. It also pastes straight into a spreadsheet: copy the result and paste it into cell A1.

Untick First row has the column names when the CSV will be appended to an existing file that already has a header.

Numbers, zeros and dates

JSON stores numbers as numbers and text as text, but a CSV stores everything as text, and the spreadsheet decides what each cell is when it opens the file. Three things follow.

Long numbers stay exact. JavaScript, and Excel, hold a number to about 15 significant digits. A 16- to 20-digit number, such as a bank account number or an order id from a large system, would be rounded if it were read as a number: 12345678901234567890 would become 12345678901234567000. The converter reads such numbers as their exact digits and writes those digits into the CSV, and tells you how many it found.

Leading zeros are written but may be dropped on opening. A PIN code or an employee code stored as text, such as "007", is written as 007. Excel, opening a CSV, sees digits and may show 7. To keep it, open the file through Excel's Data → From Text/CSV and set that column to Text, or use the JSON to Excel converter, whose .xlsx file marks such cells as text.

Dates are written as they appear in the JSON. ISO dates such as 2026-11-01 are read as dates by every spreadsheet. Other formats depend on the spreadsheet's region.

Excel and Indian languages

The downloaded file is UTF-8 with a byte-order mark: three invisible bytes at the start that tell Excel the file is UTF-8. Without them, Excel on Windows guesses an older encoding and shows ₹ and Hindi, Marathi or Tamil names as garbled symbols. With them, the text opens correctly. Copying the result to the clipboard does not add the mark, since pasted text needs none.

Large files

The converter reads the whole JSON in your browser. In our test on a laptop, a 6.1 MB JSON file with 50,000 customer records was converted in about a quarter of a second, giving a 2.4 MB CSV with 50,000 rows. Files up to 20 MB can be opened. When the result is very long, the box shows the beginning only, and Copy and Download still carry every row.

Common mistakes in pasted JSON

A comma after the last item, as in [1, 2, 3,], is allowed in JavaScript but not in JSON. Remove it.

Single quotes around names or text, as in {'name': 'Asha'}, are not JSON. Use double quotes.

Python's True, False and None are spelled true, false and null in JSON.

Two JSON objects pasted one after another without a list around them are read as JSON Lines when each is on its own line. Otherwise, put them in [ ... ] with a comma between them.

What this tool assumes

  • The JSON follows RFC 8259. JSON Lines, one value per line, is also read.
  • Rows come from the longest list of records at the top level unless you pick another table; nested objects become dotted columns, lists of plain values are joined with "; ", and lists of records become their own tables with the parent's columns copied in.
  • Cells are quoted only when they contain the separator, a double quote, a line break or edge spaces; lines end with CRLF, as RFC 4180 describes.
  • Whole numbers longer than 15 digits are kept as their exact digits.
  • The JSON stays in your browser tab and is not uploaded.

Sources

Frequently asked questions

How do I convert JSON to CSV?

Paste the JSON or open a .json file. The CSV appears at once on the right: one row for each record in the JSON list and one column for each field. Copy it, or download it as a .csv file that opens in Excel, Google Sheets or LibreOffice.

What happens to nested objects?

They become dotted columns. {"customer": {"name": "Asha", "city": "Pune"}} fills two columns, customer.name and customer.city. A list of plain values such as tags is joined into one cell with "; " between the items.

What about a list of objects inside each record, like the items of an order?

A CSV has one table, so those items cannot sit in the order's row. They become a CSV of their own: pick it under Rows from, and you get one row per item with the order's columns copied onto each row, so the file stands on its own.

Why does Excel show my CSV in one column?

Excel uses the separator of your computer's region settings. Where the decimal mark is a comma, as in much of Europe, it expects a semicolon. Choose Semicolon as the separator, or Tab, and download again.

Will long numbers and leading zeros survive?

Numbers longer than 15 digits, such as account numbers, are written exactly as text instead of being rounded. Text values such as "007" or a PIN code stay as written in the CSV, but Excel may drop leading zeros when it opens a CSV, because a CSV cannot mark a column as text. Use the JSON to Excel converter when that matters.

Is my JSON uploaded?

No. The JSON is read and converted in this browser tab, and the CSV file is made on your device. Nothing you paste or open is sent anywhere.