About the JSON to CSV Converter
JSON and CSV solve different problems. JSON stores data as nested objects and arrays — ideal for APIs and programs — while CSV is a flat grid of rows and columns that opens cleanly in Excel, Google Sheets or any database importer. This tool flattens an array of JSON objects into that grid: each object becomes a row, and every unique key across the data becomes a column header.
A worked example
Given [{"name":"Asha","age":29},{"name":"Ravi","age":34}], the converter reads the keys name and age, writes them as the header row, and lists each record beneath:
| name | age |
|---|---|
| Asha | 29 |
| Ravi | 34 |
How missing keys and extra columns are handled
Real-world JSON is rarely uniform. If one object has a phone field and another does not, the converter still creates a phone column and simply leaves the missing cell blank, so no data is lost and every row stays aligned to the same headers. This “union of all keys” approach is what lets messy API exports become a tidy spreadsheet.
Nested objects and arrays
CSV has no concept of nesting, so a value like {"address":{"city":"Pune"}} can’t sit in one cell as-is. The usual conventions are to flatten it into a dotted column such as address.city, or to keep the nested value as a compact JSON string inside the cell. Knowing this in advance saves confusion when a column shows {...} — it means that field held structured data rather than a simple value.
Getting a clean import
Values containing commas, quotes or line breaks are wrapped in quotes so a spreadsheet reads them as a single field rather than splitting the row. When you open the file, choose UTF-8 encoding to keep accented characters and symbols intact. To reverse the process, use the CSV to JSON Converter; for pretty-printing or checking your source first, the JSON Formatter & Validator is the companion tool. Everything is processed in your browser, so private datasets never leave your machine.
Frequently Asked Questions
What JSON shape does this expect?
An array of objects works best — each object becomes a row and its keys become columns. A single object is treated as one row.
What happens if objects have different keys?
The converter collects every key across all objects into the header row and leaves cells blank where a record has no value for that column.
How are nested objects and arrays handled?
Since CSV is flat, nested values are commonly flattened into dotted columns (like address.city) or written as a JSON string inside the cell.
Will it open correctly in Excel?
Yes. Fields containing commas, quotes or newlines are quoted so rows stay aligned. Open with UTF-8 encoding to preserve special characters.
Is my data uploaded to a server?
No. The conversion runs entirely in your browser, so your JSON never leaves your device.