JSON ↔ CSV Converter
Convert a JSON array of objects to CSV, and CSV back to JSON — entirely in your browser. Nothing is sent anywhere or stored.
How to use the JSON ↔ CSV converter
- Choose JSON → CSV or CSV → JSON.
- For JSON to CSV, paste a JSON array of objects (a single object is wrapped automatically). The header is the union of all keys.
- For CSV to JSON, paste CSV whose first row is the headers. Quoted fields with commas and doubled quotes are handled per RFC 4180.
- Click the button and copy the result.
Everything runs client-side, so your data never leaves your browser. Nested objects or arrays are kept as stringified JSON inside a single cell rather than expanded into extra columns.
More PAYATE tools
Frequently asked questions
What format of JSON does this expect?
A JSON array of objects — for example [{"name":"Ann","age":30},{"name":"Bob","age":25}]. Each object becomes one CSV row and its keys become the column headers. If you paste a single object, it is automatically wrapped in an array and converted as one row.
How are nested objects and arrays handled?
Values are kept simple: strings, numbers, booleans and null convert directly. A nested object or array is stringified back to JSON text inside its CSV cell rather than being flattened into separate columns. This keeps the data intact, but note the limitation — deep structures are not expanded, so for complex nesting you may want to flatten the JSON first.
Does it handle commas and quotes inside CSV fields?
Yes. Parsing and generation follow RFC 4180: fields containing a comma, double quote or newline are wrapped in double quotes, and a literal double quote inside a field is escaped by doubling it (""). So a value like Smith, John or He said "hi" round-trips correctly.
How is the header row handled?
For JSON → CSV, the first line is a header built from the union of all keys across every object, so rows missing a key simply get an empty cell. For CSV → JSON, the first row is read as the headers and each following row becomes an object mapping those headers to its values.
Is my data sent anywhere or stored?
No. Conversion runs entirely in your browser — nothing is uploaded to a server and nothing is stored. It is safe for data you would not want to transmit.
What does the output look like?
CSV output is comma-separated with \r\n line endings (Excel-friendly). JSON output is a pretty-printed array of objects with 2-space indentation, ready to copy into code or another tool.