JSON to CSV
Convert JSON arrays to CSV and back, with type inference and quoting.
JSON input
CSV output
Enter JSON on the left to convert it.
What is JSON to CSV?
A CSV to JSON (and JSON to CSV) converter translates between a flat, spreadsheet-friendly table format and JSON's nested object format. CSV is what spreadsheets, databases, and countless legacy systems export and import, while JSON is what modern APIs and JavaScript codebases speak — so this conversion comes up constantly: importing a spreadsheet export into an app that expects JSON, or turning an API's JSON array of records into a CSV a non-technical teammate can open in Excel or Google Sheets. Going from JSON to CSV means picking a column for every key that appears anywhere in the array (rows missing a given key just get an empty cell), and going from CSV to JSON means treating the first row as column headers and inferring a type — number, boolean, or string — for every other cell.
How to use JSON to CSV
- Pick a direction using the JSON ⇄ CSV toggle at the top (or click the swap button to reverse it, carrying today's output into the other side as new input).
- For JSON → CSV, paste a JSON array of objects into the left panel — a bare object or a mix of objects and non-objects will be rejected with an explanation.
- For CSV → JSON, paste CSV text with a header row into the left panel — quoted fields (with embedded commas, quotes, or newlines) are handled per the standard CSV quoting rules.
- The converted result appears instantly on the right; copy it once you're happy with it.
Examples
JSON array → CSV
Input
[{"id": 1, "name": "Ada"}, {"id": 2, "name": "Grace"}]
Output
id,name 1,Ada 2,Grace
CSV → JSON (with type inference)
Input
id,active 1,true 2,false
Output
[ { "id": 1, "active": true }, { "id": 2, "active": false } ]
Common mistakes
- Pasting a bare JSON object (not wrapped in an array) for JSON → CSV — the converter needs an array of objects, one per row, to know what a "row" even is.
- Expecting nested objects/arrays to expand into multiple CSV columns automatically — they're serialized as a single JSON-text cell instead, since CSV has no native nesting.
- Assuming every CSV cell keeps its original type after a round trip — a value like "01" or "true" as a deliberate string will come back as a number or boolean after CSV → JSON's type inference.
Why use this tool
- Runs entirely client-side — no data you convert is ever sent to a server.
- Handles ragged JSON (objects with differing keys) and quoted CSV fields correctly, not just the simplest flat case.
- Reversible in one tool — swap direction and immediately feed today's output back in as the next input.