JSON to CSV Converter
Convert JSON arrays to CSV and CSV back to JSON instantly — free, private, and runs entirely in your browser.
Paste a JSON array of objects above to see the CSV output instantly.
Switching between JSON and CSV is one of those routine tasks that crops up constantly in data work — exporting API responses for a spreadsheet, importing a client's CSV into a JSON-based data pipeline, or just eyeballing tabular data in a readable format. This tool handles both directions instantly, with no upload, no sign-up, and no server involved.
How to convert JSON to CSV
Paste your JSON array into the JSON → CSV tab. The converter expects an array of plain objects at the top level. It reads all unique keys across every object, builds a header row from them, then maps each object to a row — leaving cells blank where a key is absent. Comma-containing values are automatically quoted per the CSV standard, so the output opens correctly in Excel, Google Sheets, or any data tool.
How to convert CSV to JSON
Switch to the CSV → JSON tab and paste your CSV. The first row is treated as the header and each subsequent row becomes a JSON object. The result is pretty-printed and ready to copy. All values are returned as strings, which mirrors the behavior of most CSV parsers — you can cast numeric fields downstream if needed.
Common use cases
- API to spreadsheet: Fetch a REST API response, paste the JSON array, download the CSV, and open it in Excel or Google Sheets.
- Database seed data: Authors often write seed data as a CSV (easier to edit in a spreadsheet) and then convert it to JSON for ingestion into a seeding script.
- Data validation: Paste a CSV export from your database and scan the JSON representation to spot encoding issues or unexpected nulls.
- Client data handoffs: Clients deliver data in CSV; your app consumes JSON. Convert in seconds without opening a terminal.
- Quick analysis: Paste a JSON API response, convert it to CSV, and paste that CSV into a spreadsheet for pivot-table analysis.
Edge cases handled automatically
The converter uses PapaParse, a battle-tested open-source CSV library that correctly handles RFC 4180 quoting rules. Fields with embedded commas, newlines, or double-quote characters are wrapped in quotes and escaped — the kind of edge cases that trip up naïve string-split approaches. On the JSON side, null values produce empty CSV cells rather than the literal string "null".
Everything runs entirely in your browser. No data is transmitted anywhere. You can use this tool with sensitive business data, internal datasets, or anything else you would not want to upload to a third-party server.
Frequently Asked Questions
What JSON format does the converter accept?↓
The converter expects a JSON array of flat objects, for example [{"name":"Alice","age":30},{"name":"Bob","age":25}]. Each object becomes one row, and the keys become the column headers. Nested objects are not automatically flattened.
Does my data get sent to a server?↓
No. All conversion happens locally in your browser using the open-source PapaParse library. Your JSON or CSV never leaves your device.
Can it handle CSV files with commas inside fields?↓
Yes. PapaParse correctly handles RFC 4180-compliant CSV, including quoted fields that contain commas, line breaks, or double-quote characters.
Why does my JSON need to be an array?↓
A CSV file is inherently tabular — rows and columns. A JSON array of objects maps naturally to that structure: each object is a row and each key is a column. A single object or an array of primitives cannot be meaningfully expressed as a table.
What happens to null or missing values?↓
Null values are written as empty cells in the CSV output. Missing keys in some rows produce empty cells for those columns while other columns remain intact.