IT Market
Tools/Code/Documents/JSON to CSV Converter Online — Export to Excel
JSON → CSV

Конвертируйте JSON массив в CSV таблицу

Tool guide

JSON to CSV Converter Online — Export to Excel

An API response reads fine in code but is useless to a colleague or an accountant: brackets, quotes, everything on one line. Here an array of objects is unrolled into a table — keys become the header, each object becomes a row — producing a CSV that Excel, Google Sheets and any BI tool will open. Handy when the report is due on Monday and the service offers no export in that shape. It all runs in the browser. See also: rebuild the objects from a table, open the export as an Excel sheet, find the error in the source JSON.

How to use it

  1. Copy the API response or the contents of your JSON file and paste it whole into the «JSON Input» box, square brackets included.
  2. Records need not share their keys: the header is the union of every key, in first-seen order. Set «Delimiter:» to a comma for Google Sheets or to a semicolon for a European Excel.
  3. Press the convert button and read the table in «CSV Output»; the first line is the header built from the keys.
  4. Check fields holding nested objects or arrays — their values become text rather than separate columns.
  5. Press «Copy CSV» to paste into a spreadsheet, or «Download CSV» to get a file for Excel.

FAQ

What happens to nested objects and arrays inside a record?

They are not expanded into separate columns — a table is flat by definition, so an items or address field lands in a cell as text. If you need that data in columns, flatten the JSON first: lift address.city into its own city key and split a list of products into rows. The header then makes sense and the file totals correctly in Excel.

Why are some cells empty or some columns missing?

That happens when the objects do not share their keys. The header is the union of every key in first-seen order, so a key that appears on a single record still gets a column and the other rows leave it empty. Nothing is dropped. If you want a dense table without half-empty columns, normalise the array before converting or filter the odd records out.

I get an error on paste — what is wrong with my JSON?

The parse is strict, so single quotes instead of double, a trailing comma before a closing bracket, comments, or a response truncated when copied from the console will all fail. Another common cause is a wrapper like {"data":[…]} — the array itself is needed, not the object around it. Run the text through a JSON validator and retry.

How do I open the CSV in Excel without garbled characters?

The file is saved as UTF-8, while Excel on many locales reads a double-clicked CSV as a legacy codepage and turns non-Latin text into noise. Import through Data → From Text/CSV and choose Unicode UTF-8, or open the file in Google Sheets and save it as XLSX from there.

What if a value contains a comma or a quotation mark?

Such a value can break a column on import, so scan the CSV Output before saving — long text fields, comments and addresses are the usual suspects. A value holding a comma must be wrapped in double quotes, and a quote inside must be doubled. If hand-editing is impractical, keep those fields in JSON and export only the numeric columns.

Can I get an XLSX file directly?

No, the output is CSV — plain delimited text. XLSX is a zipped package with a complex internal structure that this page cannot assemble. The practical route is to download the CSV, open it in Excel or Google Sheets, and save as XLSX there if you need formulas, formatting or multiple sheets.

Can the site see the API response I paste in?

No. The array is parsed by the page script, the table is built in the same place, and the download button assembles the file with browser APIs, so no request carries your content anywhere. A production response with personal data can be pasted here; close the tab when you are done.

Examples

API response with an order list
Before: [{"id":1,"name":"Alex","sum":4290},{"id":2,"name":"Maria","sum":780}]
After: id,name,sum 1,Alex,4290 2,Maria,780
An object with a nested address
Before: [{"id":3,"address":{"city":"Perm"}}]
After: id,address 3,"{""city"":""Perm""}" — the nested object lands in a single cell as text, and because it holds quotes the cell is quoted with the inner quotes doubled