JSON to CSV Converter
Convert an array of JSON objects to CSV. Flattens nested objects, unions all keys, escapes fields per RFC 4180. Copy or download. Free and private.
About the JSON to CSV Converter
This JSON to CSV converter flattens an array of JSON objects into a spreadsheet-ready table. Paste your JSON, and the tool builds a header row from the union of all keys across every object, then writes one CSV row per object — ideal for exporting API responses into Excel, Google Sheets or a database import.
It handles the awkward realities of JSON. Objects with different keys are reconciled into a single column set, missing values become empty cells, and nested objects can be flattened into dotted columns (address.city) so hierarchical data fits a flat file. Arrays are embedded as JSON strings. Fields are escaped per RFC 4180, so values containing commas, quotes or newlines stay intact.
Choose comma, semicolon, tab or pipe as the delimiter to suit your target tool, then copy the result or download it as .csv. It even unwraps common {data: [...]} response wrappers. Everything runs locally in your browser.
How to Use the JSON to CSV Converter
- 1Paste a JSON array of objects into the input box.
- 2Choose the delimiter and whether to flatten nested objects.
- 3Click Convert to CSV.
- 4Copy the output or download it as a .csv file.
Frequently Asked Questions
What JSON shape does it expect?
An array of objects, like [{"name":"Ali"},{"name":"Sara"}], works best. A single object is treated as a one-row table, and a wrapper such as {"data":[...]} is unwrapped automatically. Each item must be an object for the columns to make sense.
How are objects with different keys handled?
The header row is the union of every key seen across all objects, in first-seen order. If an object is missing one of those keys, that cell is simply left empty — so you never lose columns just because some records omit a field.
What does flattening nested objects do?
With flattening on, a nested object like {"address":{"city":"Lahore"}} becomes a column named address.city. This lets hierarchical JSON fit into a flat CSV. Turn it off to keep nested objects as embedded JSON strings in a single cell.
Are fields with commas or quotes escaped correctly?
Yes. Following RFC 4180, any value containing the delimiter, a double quote or a newline is wrapped in double quotes with internal quotes doubled, so the CSV stays valid and opens cleanly in spreadsheet software.
Is my JSON uploaded anywhere?
No. The conversion happens entirely in your browser, so JSON containing personal or business data is processed locally and never sent to a server.