Конвертируйте JSON массив в CSV таблицу
Tool guide
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.
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.
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.
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.
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.
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.
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.
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.
Before: [{"id":1,"name":"Alex","sum":4290},{"id":2,"name":"Maria","sum":780}] After: id,name,sum 1,Alex,4290 2,Maria,780
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 Your rating and feedback help decide what to improve next.