Skip to content

JSON to CSV Converter

Turn a JSON array into clean, spreadsheet-ready CSV data

0 characters

Export JSON Arrays as Spreadsheet-Ready CSV Files

JSON is the native format of APIs, NoSQL databases, and modern web applications, but spreadsheets, BI tools, and legacy systems still expect flat CSV. This converter takes a JSON array of objects and produces RFC 4180-compliant CSV output with proper quoting, configurable delimiters, and optional flattening of nested structures. Paste the JSON, choose your settings, and copy or download the result.

Automatic Column Discovery

Not every object in an API response has the same keys — optional fields, schema evolution, and sparse data mean some rows may lack certain properties. The converter scans every object in the array and collects all unique keys to form the full set of column headers. Missing keys produce empty cells rather than missing columns, so the CSV has a consistent structure that spreadsheets can import without errors.

Flattening Nested Objects

CSV is inherently flat — it has no notion of nested structures. When flattening is enabled, nested objects are decomposed into dot-notation columns: a key like address.city holds the value of the city field inside an address object. Arrays that cannot be meaningfully flattened are serialized as JSON strings so no data is lost. Disable flattening if you want nested values to appear as raw JSON in a single cell.

Quoting and Special Characters

The"when needed" quoting mode wraps a field in double quotes only if it contains the delimiter, a newline, or a double quote — keeping the output clean for simple data. The"always" mode quotes every field, which some strict parsers and database import tools require. Internal double quotes are escaped by doubling them, following the RFC 4180 standard that Excel, Google Sheets, and most CSV libraries expect.

Working with API Responses

A typical workflow is to copy the JSON body from a REST endpoint's response, paste it here, and download the CSV for analysis in a spreadsheet. This is faster than writing a script for a one-off export and avoids installing a CLI tool. For paginated APIs, merge the arrays from multiple pages into one before pasting; the converter handles arrays of any length that fit in browser memory.

Privacy

All processing runs client-side in JavaScript. No data is uploaded or stored, so it is safe to convert API responses that contain user records, financial data, or internal system information.

$ faq

What JSON format does the converter accept?
The converter expects a JSON array of objects (like [{...}, {...}]) or a JSON array of arrays (like [[...], [...]]). Each object becomes one CSV row, and the object keys become column headers. Arrays of arrays produce headerless rows.
How are nested objects handled?
When"Flatten nested" is enabled, nested objects are flattened using dot notation for keys. For example, {"address": {"city":"NYC"}} becomes a column named"address.city" with the value"NYC". Arrays inside objects are serialized as JSON strings.
What quoting rules does the output follow?
The converter follows RFC 4180: fields containing the delimiter, double quotes, or newlines are wrapped in double quotes, and any double quote inside a field is escaped as two double quotes. You can also force all fields to be quoted.
Can I choose a different delimiter?
Yes. You can output with comma, semicolon, tab, or pipe separators. Semicolons are common in European locales where commas serve as decimal separators.
What if objects have different keys?
The converter collects all unique keys across every object in the array and uses them as column headers. Objects missing a key get an empty cell for that column.
Can I convert a single JSON object?
A single object (not wrapped in an array) is treated as a one-row dataset. Its keys become column headers and its values become the single data row.
Is my data sent to a server?
No. All processing runs client-side in JavaScript. Nothing is uploaded or stored.