# JSON ↔ CSV converter

Convert JSON to CSV or CSV to JSON in your browser. The direction is detected from what you paste; nested objects become columns; JSON Lines work too. Nothing is uploaded.

Page: https://toolkitnow.org/tools/json-to-csv/

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

## 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.

Runs in the browser; nothing is uploaded. Part of toolkitnow.org.
