JSON to CSV Converter
Convert an array of JSON objects to CSV online. Headers are inferred automatically from all keys across records.
Last updated:
Paste an array of JSON objects above to convert it to CSV. Column headers are inferred from all keys across every record. Choose your delimiter and copy the result — all local.
What is JSON → CSV?
Converting JSON to CSV flattens an array of objects into a spreadsheet-friendly table. It's the fastest way to hand JSON data to non-developers, open API results in Excel or Google Sheets, or bulk-import records into a database. The converter scans every object to build a complete header row, so records with different keys still line up correctly.
How to convert JSON to CSV
- 1Paste a JSON array of objects (e.g. [{"a":1},{"a":2}]) into the input pane.
- 2The tool collects all unique keys to form the header row.
- 3Pick a delimiter — comma, semicolon, tab, or pipe — to match your target program.
- 4Copy or download the CSV and open it in Excel, Sheets, or your data pipeline.
Use Cases
Open API data in a spreadsheet
Turn a JSON API response into CSV so analysts can filter and pivot it in Excel or Google Sheets.
Bulk-import into a database
Many databases and BI tools ingest CSV natively. Convert JSON records for a quick COPY / import.
Share data with non-developers
CSV is universally readable. Export JSON logs or reports as CSV for stakeholders.
Code Examples
Input JSON
[
{ "id": 1, "name": "Ada" },
{ "id": 2, "name": "Linus" }
]Output CSV
id,name
1,Ada
2,LinusKey Concepts
- RFC 4180
- The de-facto CSV standard: fields with commas, quotes, or newlines are wrapped in double quotes, and inner quotes are doubled ("").
- Delimiter
- The character separating fields. Comma is default, but European Excel often expects semicolons because the comma is a decimal separator.
- Flattening
- CSV is a flat table, so nested objects/arrays are serialized as JSON strings inside a cell. Pre-flatten deep data for clean columns.
Tips & Best Practices
- ▸Excel in some locales expects semicolons, not commas. Switch the delimiter if your columns don't split.
- ▸Nested objects become JSON text in a cell — flatten your data first if you want proper columns.
- ▸Ensure the input is an array of objects; a single object or primitive array won't map to rows cleanly.
- ▸For huge datasets, stream the conversion server-side; browsers slow down past a few hundred thousand rows.
Frequently Asked Questions
How are nested objects handled?
Nested objects and arrays are serialized as JSON strings inside the CSV cell. For deeply nested data, consider flattening it beforehand for a cleaner CSV.
Does the tool support custom delimiters?
Yes. You can choose comma, semicolon, tab, or pipe as the delimiter — useful for locale-specific CSV variants (e.g. European Excel uses semicolons).
Related Tools
JSON → TypeScript
Convert JSON to TypeScript interfaces instantly. Generate strongly-typed TS types from any JSON sample.
JSON → Go
Convert JSON to Go structs online. Generates idiomatic Go structs with proper json tags and PascalCase field names.
JSON → YAML
Convert JSON to YAML online. Preserve structure, comments-free, and ready to paste into Kubernetes or CI configs.
YAML → JSON
Convert YAML documents to JSON online. Supports YAML 1.2, multi-document streams, and produces pretty-printed JSON output.
CSV → JSON
Convert CSV data to a JSON array of objects online. Auto-detects delimiter and quotes, preserves numeric types when requested.
Number Base
Convert numbers between binary, octal, decimal, and hexadecimal. Supports arbitrarily large integers using BigInt.