JSON to CSV
Convert JSON arrays or objects into CSV data for spreadsheets, analysis and data exchange directly in your browser.
Your result will appear here.
JSON to CSV online
Flatten a JSON array of objects into CSV — one row per object, the union of all keys as columns — for spreadsheets, reports and systems that still run on comma-separated files.
How to use this tool
- Paste a JSON array of objects (a single object works too) into the input box.
- Click Run Tool. Columns are collected from every object, so keys that appear in only some rows still get a column.
- Copy the CSV from the result panel and save it with a .csv extension, or paste it straight into a spreadsheet.
Common uses
Exporting API responses into Excel or Google Sheets, turning query results into a report attachment, migrating records between tools that only import CSV, and quick eyeball-checks of a dataset in a spreadsheet grid.
How it works
The converter walks the array, gathers the union of all object keys in first-seen order as the header row, then writes one row per object. A key missing from an object becomes an empty cell. Values containing commas, quotes or line breaks are wrapped in double quotes with inner quotes doubled, per CSV convention. Nested objects and arrays do not flatten — an array cell is written as its comma-joined text and a nested object as [object Object], so flatten nested data first if you need it in the grid.
Worked example
Paste:
[{ "name": "Ana", "age": 30 }, { "name": "Bo", "city": "Oslo" }]and the result is:
name,age,city Ana,30, Bo,,Oslo
The city column exists because the second object has it; the first row simply leaves it empty.
Privacy and browser processing
Your JSON is converted in your browser with JavaScript — it is never uploaded or stored.
Frequently asked questions
What input shape does it expect?
An array of flat objects is the useful case. A single object becomes a one-row CSV with a header. A bare array of numbers produces a one-column CSV headed "value".
Why did my nested object turn into [object Object]?
CSV has no nesting, and the converter does not guess a flattening scheme. Flatten nested objects into dotted keys (user_name, user_city) in your JSON first, or the cell will carry the placeholder text.
Can I control the column order?
Columns follow the order keys first appear across the array. Reorder the keys in the first object to lead the columns where you want them.
Are special characters escaped safely?
Yes. Any value containing a comma, double quote or line break is quoted, and inner quotes are doubled — the standard CSV escaping that Excel and Sheets both read.
Is my JSON uploaded?
No. The conversion runs in your browser; nothing is sent to a server.