JSON to CSV Converter — Export JSON Arrays to Spreadsheet Format
FreeConvert JSON arrays to CSV for Excel, Google Sheets, or database import. Handles nested objects. Free, runs in your browser, no upload.
What's next
Settings guide
Delimiter: Comma, semicolon, or tab. Match the delimiter to your target tool — Excel in European locales often expects semicolons.
Nested object handling:
- ·Flatten — Nested objects are flattened with dot notation:
{"address": {"city": "London"}}becomes a column namedaddress.city. Arrays inside objects become semicolon-separated strings. - ·Stringify — Nested objects and arrays are JSON-stringified into a single column value. Use when the target system expects raw JSON in a cell.
Missing field handling: Keys present in some objects but not others get an empty cell — never skipped or shifted. Column order matches the key insertion order of the first object in the array.
Format comparison
JSON to CSV vs JSON to Excel (.xlsx): CSV is universally importable — every spreadsheet and database tool accepts it. Excel files require a library like exceljs or xlsx to generate programmatically. For one-off exports, CSV is simpler; for automated pipelines generating formatted spreadsheets, a dedicated Excel library is better.
Flat JSON vs nested JSON for CSV export: CSV is inherently flat — two dimensions only. Deeply nested JSON requires a flattening decision at each level. For simple JSON arrays (one level of keys, scalar values), the conversion is lossless. For complex nested structures, some information is necessarily condensed.
How it works
Validate and parse
The JSON is parsed and confirmed to be an array of objects. A single object is wrapped in an array automatically. Non-array JSON (a plain object or scalar) is reported as incompatible.
Extract all headers
All unique keys across every object in the array are collected. Keys are ordered by first appearance. This handles arrays where different objects have different keys.
Map values to columns
For each object, values are written to the correct column position. Missing keys produce empty cells. Nested objects are flattened or stringified per the selected option.
Output CSV
The header row and data rows are assembled with your chosen delimiter. Values containing the delimiter or newlines are automatically quoted. Download or copy the result.
About this format
API responses come in JSON. Business stakeholders, data analysts, and database import tools want CSV. Converting a JSON array of objects into a flat CSV file is a routine but tedious task without the right tool.
Paste a JSON array and the converter extracts all unique keys across the dataset as column headers, maps each object's values to the correct column (handling missing fields gracefully), and produces a CSV ready for Excel, Google Sheets, or `COPY` into a PostgreSQL table.