JSON to CSV Converter

Turns a JSON array of objects into CSV you can open in any spreadsheet. Nested fields become dotted column names, arrays stay as JSON text and risky cells are quoted correctly.

The output will appear here.
Advertisement icyabmod — 7 sections × 10 designs and 10 color palettes: design your site yourself, preview ready in 48 hours

How JSON to CSV Converter works

Turns a JSON array of objects into CSV you can open in any spreadsheet. Nested fields become dotted column names, arrays stay as JSON text and risky cells are quoted correctly.

Input JSON
Output CSV
Works done 2,057

How to use it

This JSON to CSV converter turns an API response or JSON export into comma-separated rows and columns that you can open in a spreadsheet, filter and share. Nested objects are flattened into dotted column names such as customer.name, arrays are kept as JSON text inside a single cell, and any cell that could break the table is quoted. It all happens in your browser.

How to convert JSON to CSV

  1. Paste your JSON, ideally an array in which each object is one record.
  2. Convert it with "Run tool" or the Ctrl + Enter shortcut.
  3. If an error appears, the JSON is invalid; fix the spot named by its line and column.
  4. Copy the CSV or download it, then change the file extension from .txt to .csv.

From nested JSON to a flat table

Suppose an order export contains two records. The first is {"id":1,"customer":{"name":"Sam","address":{"city":"Leeds"}},"items":["mug","tea"],"note":"leave at door, ring twice","coupon":null,"paid":true}; the second has only an id, a customer name and a gift flag. The converter produces this table:

idcustomer.namecustomer.address.cityitemsnotecouponpaidgift
1SamLeeds["mug","tea"]leave at door, ring twicetrue
2Priyatrue

Four details are worth noticing. Nesting at any depth becomes a dotted path. The array stays in one cell, written in the raw file as "[""mug"",""tea""]" with its quotes doubled. null becomes an empty cell. And gift, which only the second record has, appears as the last column because columns follow the order in which keys first appear.

Mapping rules

  • Array of objects: one row per object, one column per key across all objects.
  • Single object: a one-row table.
  • Array of plain values such as [1,"x",null]: a single column named value.
  • Empty object: written as the text {}.
  • Booleans and numbers: written as text, for example true and 42.
  • Quoting: a cell is wrapped in double quotes when it contains a comma, semicolon, tab, pipe, quote or line break, or starts or ends with a space. Inner quotes are doubled.
  • Delimiter and line endings: always a comma, with one line per record.

Opening the CSV in a spreadsheet

  • Everything lands in column A: in regions that use a comma as the decimal separator, spreadsheets expect semicolons. Use the import wizard ("from text" or "from CSV") and choose comma as the delimiter.
  • Accented letters look garbled: the output is UTF-8 without a byte order mark, and some programs then assume a legacy encoding. Pick UTF-8 in the import dialog.
  • Values change on import: spreadsheets may strip the leading zero from 02134, turn 1-2 into a date or show long IDs in scientific notation. Set those columns to Text during import.

One caution on the JSON side: IDs longer than about 16 digits that are stored as numbers can lose precision when the JSON is parsed. Keep such values as strings in the source.

Limits

You cannot pick a different delimiter or reorder columns, and arrays are not exploded into extra rows. If you need one row per order item, reshape the data first so that each item is its own record. To control column order, write the keys of the first record in the order you want; later records follow it.

Privacy and related tools

The conversion runs in JavaScript in your browser; customer and order data stay on your device, and the page only increments an anonymous usage counter. Validate long or hand-edited input first in the JSON formatter. To go the other way, use the CSV to JSON converter, and see CSV vs JSON for the trade-offs between the formats.

Advertisement icyabmod — admin panel included: update your website yourself, no code

Frequently asked questions

They are flattened into dotted column names. A name field inside a customer object becomes a customer.name column, and deeper fields extend the path, as in customer.address.city. Arrays are not split into rows; they are written into a single cell as JSON text. If you need each array element on its own row, restructure the data before converting so that every element is a separate record.

The converter always uses a comma as the delimiter. Spreadsheets configured for regions where the comma is the decimal separator expect semicolons, so a double-clicked comma-separated file ends up with each row in one cell. Open the file through the spreadsheet's import function and select comma as the separator. Changing the list separator in your system's regional settings also works, but it affects every other file.

Not in the tool itself: every key found in the data becomes a column, in the order keys first appear. You can delete unwanted columns after opening the CSV in a spreadsheet, or remove those keys from the JSON before converting. To set the column order, arrange the keys of the first record in the order you want, since later records follow that order.

Not directly, because the input has to be a single JSON value and JSON Lines contains one document per line. Wrap the lines in square brackets and add a comma at the end of each line except the last, which turns them into an array. After that, the converter treats each line as a record and builds the table normally. For large exports, do this transformation in your editor with find and replace.