Stax

JSON to CSV Converter

Convert JSON arrays to CSV. Download or copy instantly.

Must be an array of objects

3 rows · 4 columns
name,age,city,role
Alice,28,Mumbai,Engineer
Bob,34,Delhi,Designer
Carol,25,Bengaluru,PM
Nested objects and arrays are JSON-stringified in their cell. Values containing commas, quotes, or line breaks are automatically quoted per RFC 4180.

Why convert JSON to CSV?

JSON is the standard format for APIs and web applications, but CSV is what spreadsheet tools (Excel, Google Sheets) natively understand. Converting API response data to CSV lets you analyse it in familiar tools, share it with non-technical stakeholders, or import it into databases that accept bulk CSV uploads.

When to use this tool

  • Exporting API data to share with the business team in a spreadsheet
  • Converting database query results (often returned as JSON) for reporting
  • Preparing data for bulk import into CRMs, email tools, or analytics platforms
  • Quick data analysis without writing a script

CSV format (RFC 4180)

This converter follows RFC 4180, the de facto standard for CSV files. Fields containing commas, double quotes, or newlines are enclosed in double quotes. Double quotes within fields are represented by two consecutive double quotes. This ensures the output is compatible with Excel, Google Sheets, and virtually all data tools.

Frequently asked questions

What JSON format does this converter accept?
The converter accepts a JSON array of objects — for example: [{"name": "Alice", "age": 28}, {"name": "Bob", "age": 34}]. Each object becomes a row in the CSV; the keys become column headers.
What happens to nested objects or arrays?
Nested objects and arrays are JSON-stringified into a single cell value. For example, {"address": {"city": "Mumbai"}} becomes a cell containing {"city":"Mumbai"}. For deeply nested data, consider flattening it before converting.
How are special characters handled?
Values containing commas, double quotes, or newlines are automatically wrapped in double quotes per RFC 4180 — the standard CSV format. Double quotes within values are escaped by doubling them (e.g. " becomes "").
What if objects have different keys?
The converter collects all unique keys from all objects and uses them as headers. Objects missing a key will have an empty cell for that column. This handles inconsistent JSON structures gracefully.
Is my data sent to a server?
No. All conversion happens entirely in your browser using JavaScript. No data is uploaded or stored anywhere.

Related tools