JSON to CSV Converter

Turn your JSON data into CSV format for Excel or Google Sheets. Fast, secure, and client-side processing.

JSON Input (Array)
CSV Output

Open JSON Data in Excel or Google Sheets

APIs, databases and web apps hand out data as JSON, but the people who need to review it — managers, accountants, marketing teams, teachers — usually want a spreadsheet. This converter turns a JSON array into CSV, which opens directly in Excel, Google Sheets or LibreOffice. Nested objects are flattened automatically so every value gets its own column.

How to Use the JSON to CSV Converter

  1. Paste a JSON array into the JSON Input box, or click Load Sample.
  2. Click Convert to CSV.
  3. Copy the CSV output, paste it into a text file and save it as data.csv — or paste directly into Google Sheets and use Data → Split text to columns.

Example

JSON input:

[
  { "id": 1, "name": "Aman", "contact": { "email": "aman@example.com", "phone": "98290 12345" } },
  { "id": 2, "name": "Sita", "contact": { "email": "sita@example.com", "phone": "98290 67890" } }
]

CSV output:

id,name,contact.email,contact.phone
"1","Aman","aman@example.com","98290 12345"
"2","Sita","sita@example.com","98290 67890"

The nested contact object has been flattened into two columns, contact.email and contact.phone.

How the Conversion Works

  1. The converter reads every object in the array and collects all keys, flattening nested objects with dots.
  2. Those keys become the header row.
  3. Each object becomes one row. Missing keys are left as empty cells.
  4. Each value is wrapped in quotes and internal quotes are doubled, so commas and quotes inside text don’t break the columns.

Preparing Your JSON

  • Use an array of records. A single object is converted as one row. If your API returns {"data": [ ... ]}, copy only the array inside data, otherwise everything ends up in one long row.
  • Keep objects consistent. Rows with very different keys create many mostly-empty columns.
  • Validate first. If you see an “Invalid JSON” message, run it through our JSON Formatter to find the error.

Opening CSV Files Correctly in Excel

Double-clicking a CSV usually works, but Excel sometimes misreads non-English characters or long numbers. For best results:

  • Use Data → From Text/CSV and choose 65001: Unicode (UTF-8) as the file origin.
  • Set long numeric columns (phone numbers, account numbers, ID numbers) to Text so Excel doesn’t convert them to scientific notation like 9.83E+09.
  • Save as .xlsx once you start adding formatting or formulas; CSV only stores plain values.

Typical Uses

  • Exporting orders, users or leads from an API for a business report.
  • Sharing analytics data with non-technical colleagues.
  • Importing data into tools that accept CSV uploads, such as email marketing platforms.
  • Quickly checking a large API response by sorting and filtering it in a spreadsheet.

Related Tools

Frequently Asked Questions

An array of objects, where each object is one row, for example [{"id":1,"name":"Aman"},{"id":2,"name":"Sita"}]. The keys become the column headers. A single object is converted as one row.
Nested objects are flattened using dot notation. A field like {"contact": {"email": "a@b.com"}} becomes a column named contact.email, so it fits into a flat spreadsheet.
Arrays are written as text in a single cell, with items separated by commas. If you need each item in its own row or column, restructure the JSON first.
Copy the output into a text file and save it with a .csv extension, then open it in Excel. If special characters such as ₹ look wrong, use Data → From Text/CSV and choose UTF-8 encoding.
Yes. Every value is wrapped in double quotes, and any double quotes inside a value are doubled, following the standard CSV rules that Excel and Google Sheets understand.
No. The conversion runs entirely in your browser.