JSON ↔ CSV converter

Paste JSON to get CSV, or paste CSV to get JSON. The direction follows what you paste.

JSON or CSV
CSV Example 3 rows, 6 columns
order,total,currency,ship_to.city,ship_to.country,items
A-1042,58.2,EUR,Lisbon,PT,"[""tea"",""mug""]"
A-1043,12,EUR,Ghent,BE,"[""card""]"
A-1044,140.75,USD,"Portland, ME",US,[]

The gray text is an example. Paste or type your data, or open or drop a file.

Options

How it converts

Nested objects
{"ship_to":{"city":"Lisbon"}} becomes the column ship_to.city. Turn this off under Options to keep the object as JSON text.
Arrays
Kept whole, as JSON text in one cell: ["tea","mug"].
Quoting
A value that contains the delimiter, a double quote or a line break is wrapped in double quotes, and quotes inside it are doubled (RFC 4180).
CSV to JSON
The first row names the keys. Every value stays text, so leading zeros and long IDs are kept exactly.
JSON Lines
One object per line works too. Each line becomes a row.
Open from a link
?input=[{"id":7}]&delimiter=semicolon opens the page with that JSON as CSV, ready to share.