JSON to CSV Converter – Turn JSON into CSV Instantly
Paste a JSON array of objects or arrays and convert it to clean, RFC 4180 compliant CSV with header detection, nested object flattening, custom delimiters, and full quote handling. No signup, no uploads — everything runs in your browser.
Configure
Set up your conversionCSV Output
ResultsYour CSV will appear here
Paste some JSON, choose a delimiter, then click Convert to CSV.
What does the JSON to CSV converter do?
This free online tool takes JSON — usually an array of objects like [{"name": "Alice", "age": 30}, ...] — and turns it into RFC 4180 compliant CSV. The union of all object keys across every record becomes the header row, and each object becomes a data row. Missing keys become empty cells, so nothing gets dropped.
Nested objects are flattened with dot notation when the Flatten nested objects toggle is on. So {"address": {"city": "London", "zip": "SW1"}} becomes two columns: address.city and address.zip. Arrays inside a record are joined with a pipe character by default, so you don't lose data when a field holds a list.
Everything runs locally in your browser. Your JSON never leaves your device — no server upload, no logging, no tracking. Close the tab and it's gone.
How to convert JSON to CSV — step by step
- Paste your JSON: Drop an array of objects, an array of arrays, a single object, or an object wrapping a single array into the input box.
- Choose the output delimiter: Comma is the standard CSV format. Use semicolon for European locales, tab for TSV, or pipe if your target system expects it.
- Set the toggles: Add a header row, flatten nested objects, quote fields per RFC 4180, and trim whitespace from string values.
- Click Convert to CSV: The tool parses your JSON and shows the CSV instantly, with row and column counts.
- Copy or download: Use the Copy CSV button or download the result as a real
.csvfile ready for Excel, Google Sheets, or any database import.
Shortcut: Press Ctrl + Enter (or Cmd + Enter on Mac) inside the input box to convert instantly.
Example: before and after
Input (JSON array of objects)
[
{"Name": "Alice", "Age": 30, "City": "New York", "Active": true},
{"Name": "Bob", "Age": 25, "City": "London", "Active": false}
]
Output CSV (comma-delimited, header on)
Name,Age,City,Active
Alice,30,New York,true
Bob,25,London,false
Nested objects, flattened
[
{"id": 1, "user": {"name": "Alice", "email": "a@x.com"}},
{"id": 2, "user": {"name": "Bob", "email": "b@x.com"}}
]
With flattening on, this becomes:
id,user.name,user.email
1,Alice,a@x.com
2,Bob,b@x.com
If any value contains a comma, quote, or newline, it's automatically wrapped in double quotes with internal quotes escaped as "".
Supported JSON shapes
| JSON shape | Result | Notes |
|---|---|---|
| Array of objects | Header row from union of keys + one row per object | Most common. Missing keys become empty cells. |
| Array of arrays | Rows only, no header | Perfect when data has no named columns. |
| Single object | One header row + one data row | Wrap in [...] for a multi-row CSV. |
| Object with one array property | Converts the inner array | Convenient for API responses like {"data": [...]}. |
| Nested arrays | Flattened to a joined string by default | Each element is coerced to a string and joined with |. |
| Null / boolean / number values | Written directly | JSON null becomes an empty cell in CSV. |
When would you need to convert JSON to CSV?
API responses to spreadsheets
Copy a JSON API response, paste it here, and open the result in Excel or Google Sheets for quick review or sharing with non-technical teammates.
Data analysis
Pandas, R, and most BI tools prefer tabular data. Convert your JSON exports to CSV before loading them into a notebook or dashboard.
Database bulk imports
Most relational databases and admin tools accept CSV uploads. Convert your JSON to CSV and import it in one go.
Reports and admin exports
Turn a JSON dump from an internal tool into a CSV report that can be emailed or attached to a ticket.
Data migration prep
Flatten nested JSON exports from one system into CSV rows for a different system that expects flat records.
Sharing with non-devs
JSON is great for machines, CSV is great for people. Convert once and hand off a file anyone can open in Excel.
Tips and best practices
- Use an array of objects when possible. Named keys produce a much more useful CSV than positional arrays, because the header row carries meaning.
- Watch out for inconsistent keys. If some objects have
{"name": ...}and others have{"Name": ...}, they'll become separate columns with empty cells for the mismatched rows. Normalise your keys first for a cleaner result. - Flatten only when you need flat data. If a downstream system can handle dotted keys like
user.name, keep flattening on. If you'd rather keep the nested object as a stringified JSON cell, turn flattening off. - Use semicolon output for European Excel. Excel in many EU locales expects semicolons to delimit fields. If opening the CSV puts everything in column A, try semicolon output.
- Keep quoting on. It's the difference between a file that imports cleanly and one where columns shift because a field contained a comma.
- Watch out for leading zeros. Excel strips them from numbers on import. If you have codes like
007, quote those fields or prefix with an apostrophe after import. - Need the reverse? Try the CSV to JSON tool to go the other way.
- Need to beautify the JSON first? Run it through the JSON Formatter.
Related tools you might need
- CSV to JSON — reverse of this tool.
- JSON Formatter — prettify and validate JSON before converting.
- JSON Validator — check JSON syntax and locate errors.
- JSON Minifier — shrink JSON payloads.
- CSV to Text — flatten CSV to plain text.
- Text to CSV — convert plain text to CSV.
- Whitespace Cleaner — clean up messy CSV before converting.
Privacy, accuracy, and limits
Privacy: Nothing you paste into this converter is sent to a server. The whole JSON parser and CSV writer is JavaScript running in your browser tab. There is no upload, no analytics event containing your data, and no server-side log.
Accuracy: The CSV writer follows RFC 4180 — any field containing the delimiter, a double quote, or a newline is wrapped in double quotes, and internal quotes are doubled. Nested objects are flattened with dot notation. Arrays are joined with a pipe by default.
Limits: There is no hard limit on input size. Since everything runs in-browser, the practical limit is your device's memory. A JSON array with tens of thousands of records converts in well under a second. Very large pastes (multiple megabytes) may take a moment. A built-in safety guard warns you before generating output that could freeze the tab.
Frequently asked questions
address.city and address.zip are lifted into their own columns. Nested arrays are joined with a pipe by default..csv file. It opens directly in Excel, Google Sheets, Numbers, and any database import wizard.