How to Convert JSON to CSV
Converting JSON (JavaScript Object Notation) to CSV (Comma-Separated Values) is essential when you need to open data in Excel, Google Sheets, or import it into a database. Here is how to do it with this free online tool:
- Paste or upload your JSON data. Either paste your JSON array directly into the input panel, or click "Upload File" to load a
.json file from your computer.
- Choose your options. Select the output delimiter (comma, tab, semicolon, or pipe). Toggle "Include header row" to add or remove column headers. Enable "Flatten nested objects" to convert nested properties into dot-notation columns.
- Get your CSV instantly. The conversion happens automatically as you type or paste. The CSV output appears in the right panel in real time, with row and column counts displayed above it.
- Copy or download the result. Click "Copy CSV" to copy the output to your clipboard, or click "Download CSV" to save it as a
.csv file you can open in any spreadsheet application.
The entire conversion runs in your browser. Your data is never uploaded to a server or stored anywhere.
Supported JSON Formats
This converter handles the most common JSON structures you will encounter when working with APIs, databases, and data exports:
| JSON Format |
Example |
CSV Result |
| Array of objects | [{"a":1},{"a":2}] | Header row + data rows |
| Array of arrays | [[1,2],[3,4]] | Data rows (no headers) |
| Single object | {"a":1,"b":2} | One header row + one data row |
| Nested objects | [{"a":{"b":1}}] | Flattened: a.b column |
| Mixed types | [{"a":1,"b":"hi"}] | Strings, numbers, booleans preserved |
Tip: If your JSON contains deeply nested arrays or objects, enable "Flatten nested objects" to automatically expand them into separate columns. Arrays within values are serialized as JSON strings so no data is lost.
Frequently Asked Questions
How do I convert JSON to CSV?
Paste your JSON array into the input panel or upload a .json file. The tool automatically converts it to CSV in real time. You can then copy the CSV to your clipboard or download it as a .csv file.
Is my data safe when using this converter?
Yes. All conversion happens locally in your browser using JavaScript. Your data is never sent to any server, stored, or tracked. It never leaves your device.
What JSON formats are supported?
The converter supports arrays of objects (the most common format from APIs), arrays of arrays, and single objects. Nested objects and arrays are automatically flattened using dot notation (e.g., address.city).
Can I convert CSV back to JSON?
Yes. Click the "CSV to JSON" button to go to our dedicated CSV to JSON converter, which supports custom delimiters, header rows, and quoted fields.
How does the converter handle nested JSON objects?
When "Flatten nested objects" is enabled, nested objects are expanded into dot-notation column headers. For example, {"address": {"city": "NYC"}} becomes a column named "address.city" with value "NYC". Nested arrays are serialized as JSON strings to preserve the data.