JSON → CSV
JSON Input
Loading editor…
CSV Output
Loading editor…

JSON to CSV Converter

Paste a JSON array of objects into the left panel and get a clean CSV in the right panel instantly. Each object becomes a row, and keys become column headers. Download the result as a .csv file ready for Excel or Google Sheets.

Real-time
Output updates as you type.
Auto headers
Keys become column headers.
Copy
One-click copy to clipboard.
Download
Save output as a .csv file.

What JSON Structure Works for CSV

CSV is a flat, tabular format — rows and columns with no nesting. The converter works best with a JSON array of objects where every object has the same keys:

[
  { "id": 1, "name": "Alice", "role": "Engineer" },
  { "id": 2, "name": "Bob",   "role": "Designer" }
]

Each object becomes one CSV row, and the keys become column headers:

id,name,role
1,Alice,Engineer
2,Bob,Designer

If your JSON is a single object, wrap it in [] brackets first to make it a one-row array.

If objects have different keys, all unique keys are used as headers and missing values are left as empty cells.

Nested objects and arrays are serialized as JSON strings inside the cell — they cannot be represented as CSV columns without flattening first.

Common Use Cases

REST APIs return JSON arrays. Converting the response to CSV lets you open it in Excel or Google Sheets for analysis, filtering, or sharing with colleagues who don't work with raw JSON.

For database bulk imports, MySQL, PostgreSQL's COPY, and Airtable all accept CSV. Converting a JSON fixture file to CSV is faster than writing a custom import script.

Python's pandas, R, and most BI tools read CSV natively — no JSON parser needed. For data migrations, CSV is often the lowest common denominator that both the source and destination system understand without custom adapters.

Handling Nested JSON

CSV cannot represent nested structures natively. If your JSON has nested objects or arrays, you have two options:

Option 1 — flatten before converting. Restructure your JSON to move nested values to top-level keys:

// Before
{ "user": { "name": "Alice", "city": "NYC" } }

// After flattening
{ "user_name": "Alice", "user_city": "NYC" }

Option 2 — accept stringified cells. The converter will serialize nested values as JSON strings inside the CSV cell. This is lossy for analysis but acceptable if you just need a quick export and the nested fields are not critical.

For automated flattening, tools like flat (npm) or Python's pandas.json_normalize() handle this before you paste the result here.

Frequently Asked Questions

What JSON format is required for CSV conversion?

The input must be a JSON array of objects, e.g. [{"name": "Alice", "age": 30}]. Each object becomes one CSV row and the keys become column headers.

What happens if objects have different keys?

The converter handles mixed keys gracefully — all unique keys across all objects are used as column headers, and missing values are left empty in the corresponding cells.

Can I convert nested JSON to CSV?

Nested objects and arrays are serialized as JSON strings inside the CSV cell. For proper column-per-field output, flatten your JSON first using a tool like flat (npm) or pandas.json_normalize() in Python.

Can I open the downloaded CSV in Excel or Google Sheets?

Yes. The output uses standard comma-separated values with a header row, which opens directly in Excel, Google Sheets, LibreOffice Calc, and any other spreadsheet application.

Can I convert CSV back to JSON?

Yes — use the CSV to JSON tool on JSONbite. It supports header detection, dynamic typing, and handles quoted fields with commas.

Is my data sent to a server?

No. Conversion happens entirely in your browser using the PapaParse library. Your data never leaves your machine.

More Tools