Home › JSON to CSV
JSON to CSV Converter
Convert a JSON array of objects into CSV, or turn CSV back into pretty-printed JSON. Quoted fields, commas, and newlines are handled correctly. Everything runs locally in your browser — nothing is uploaded.
Input — JSON array of objects
Output — CSV
All parsing and conversion happens on your device. No network calls are made and nothing you paste leaves your browser.
What is a JSON to CSV converter?
A JSON to CSV converter transforms a JSON array of objects — the format most APIs and databases return — into comma-separated values that open cleanly in Excel, Google Sheets, or any spreadsheet program. Each object becomes a row and each key becomes a column. This tool also works in reverse as a CSV to JSON converter, parsing a CSV file (including fields wrapped in quotes that contain commas or line breaks) back into a structured JSON array.
How to use it
1. Choose a direction with the toggle: JSON → CSV or CSV → JSON. 2. Paste your data into the input box (click Sample to see the expected shape). 3. Press Convert. 4. Click Copy to grab the result. When converting JSON to CSV, the header row is built from the union of all object keys in the order they first appear, so rows with missing keys still line up correctly.
How are commas and quotes handled?
This converter follows the common CSV escaping rules (RFC 4180). When writing CSV, any value that contains a comma, a double quote, or a newline is wrapped in double quotes, and any double quotes inside the value are doubled (" becomes ""). Nested objects and arrays are serialized with JSON.stringify so no structure is lost, and null values become empty cells. When reading CSV, the parser respects quoted fields, so a comma or newline inside quotes is treated as part of the value rather than a delimiter.
Is my data safe?
Yes. The conversion runs entirely in your browser using plain JavaScript and the built-in JSON.parse engine. Nothing you paste is uploaded to a server, making it safe for sensitive exports and internal data.
Frequently asked questions
Does the JSON have to be an array? For JSON → CSV the top level must be an array of objects, because CSV is a table of rows. If you paste a single object, wrap it in square brackets to make a one-row array.
What happens to nested objects and arrays? They are kept as JSON text inside the cell (for example {"city":"Oslo"}), so you never lose data when round-tripping.
Can it handle a CSV with newlines inside a field? Yes. As long as the field is wrapped in double quotes, line breaks inside it are preserved and the row is parsed correctly.