JSON to CSV Converter (and CSV to JSON)
A JSON to CSV converter turns a JSON array of objects into a comma-separated table, and a CSV to JSON converter turns that table back into structured JSON. The tool below does both directions entirely in your browser. Paste your data, pick a direction, and the converted output appears with no upload and no account.
What CSV and JSON Are
CSV, short for comma-separated values, is a plain text format where each line is a record and each value on the line is separated by a comma. The first line is usually a header that names the columns. Spreadsheets, databases, and analytics tools read and write CSV because it is simple and universal.
JSON, short for JavaScript Object Notation, stores data as keys paired with values, grouped into objects and arrays. It is the standard format that web APIs return and that most programming languages parse natively. JSON can describe nested structures, while CSV is flat, which is the main difference to keep in mind when you convert between them.
How to Use This Converter
- Choose the direction: JSON to CSV, or CSV to JSON.
- Paste your data into the input box. For JSON, use an array of flat objects. For CSV, include a header row on top.
- Read the converted output as it appears below the box. There is no button to press.
- Select the output text and copy it into your spreadsheet, code, or file.
- If you see a message instead of output, fix the reported problem and the result updates as you type.
How the Conversion Works
Going from JSON to CSV, the converter collects every key that appears across your objects and uses them as the column headers. Each object then becomes one row, with values placed under the matching column. Going from CSV to JSON, the first line becomes the set of keys and every later line becomes one object that pairs those keys with the values on that row.
| JSON | CSV |
|---|---|
| Array of objects | Whole file |
| Object keys | Header row |
| One object | One data row |
| Value | Cell under its column |
When to Use It
Convert JSON to CSV when you pull data from an API and need to open it in a spreadsheet, hand it to a non-technical teammate, or load it into a tool that only accepts tables. Convert CSV to JSON when you export rows from a spreadsheet or database and need structured data for code, a configuration file, or another API. The converter is also handy for quick checks, like confirming that an export has the columns you expect before you import it somewhere else.
It Runs in Your Browser
The conversion happens locally on your device using your browser. Your JSON and CSV are never uploaded, logged, or stored on a server, so it is safe to paste data that you would not want to send across the internet. You can confirm this by disconnecting from the network and watching the converter keep working.
Last Thoughts on Converting Between JSON and CSV
JSON and CSV solve the same problem from two angles: JSON describes structured records that code can read directly, and CSV lays those records out as a flat table that spreadsheets and people can read. Moving between them is a routine step in almost any data task, and the only thing to watch is the flat-objects rule, because nesting is the one shape CSV cannot hold on its own.
Paste your data above to convert it now, and keep the rest of our free online tools nearby for the next step. To tidy raw JSON before converting it, use the JSON formatter; to handle encoded fields, see the Base64 encoder and decoder and the URL encoder and decoder.
Key Takeaways:
- JSON to CSV maps object keys to a header row and each object to one data row; CSV to JSON reverses that mapping.
- The converter expects a JSON array of flat objects, since CSV has no way to store nested structures directly.
- Any nested value is written as compact JSON text inside a single cell, so nothing is dropped during conversion.
- Values that contain commas, quotes, or line breaks are quoted and escaped so the CSV stays valid.
- The tool works in both directions and updates the output as you type, with no button to press.
- Everything runs in your browser; your data is never uploaded or stored.
Frequently Asked Questions (FAQs)
How do I convert JSON to CSV?
Choose the JSON to CSV direction, paste a JSON array of flat objects into the input box, and read the CSV that appears below. The object keys become the header row and each object becomes one row. Then select the output and copy it into your spreadsheet or file.
How do I convert CSV to JSON?
Switch the direction to CSV to JSON and paste a CSV table that has a header row on the first line. The converter uses the header as the keys and turns every later row into one JSON object, then shows the formatted JSON array ready to copy.
Does this converter handle nested JSON?
CSV is a flat format, so the converter expects an array of flat objects. If an object contains a nested object or list, that value is written as compact JSON text inside one CSV cell so no data is lost, but it is not split into separate columns.
What happens to commas inside my values?
Any value that contains a comma, a double quote, or a line break is wrapped in double quotes, and inner quotes are doubled, following the standard CSV rules. This keeps the table valid so it opens correctly in spreadsheets and other tools.
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser on your own device. Your JSON and CSV are never sent to a server, logged, or stored, which you can verify by disconnecting from the internet and watching the tool still work.
Why do I see a message instead of converted output?
The tool shows a short message when the input is empty, when JSON cannot be parsed, or when the data is not an array of objects. Fix the reported issue, such as a missing bracket or a non-object item, and the converted output appears as you type.


