Two-Way Conversion
Switch between JSON → CSV and CSV → JSON with one click; the output updates live as you type. Going to CSV, the input must be a JSON array of objects — the keys of the first object become the header row. Going to JSON, the first CSV line is read as headers and every following row becomes one object.
Example input:
[{"name":"Alice","age":30},{"name":"Bob","age":25}]
CSV output:
name,age
Alice,30
Bob,25
Paste that CSV back in the other direction and you get the JSON array again — pretty-printed with 2-space indentation, ready to paste into code or a fixture file.
Escaping: Commas, Quotes, Newlines
Naive CSV export breaks the moment a value contains a comma. This converter applies the RFC 4180 rules automatically:
| Value contains | Handling | Example value | In CSV |
|---|---|---|---|
| Comma | Wrap in quotes | Doe, Jane | "Doe, Jane" |
| Double quote | Quote + double the quote | 5" screen | "5"" screen" |
| Line break | Wrap in quotes | multi-line note | "line1\nline2" |
The CSV → JSON parser understands the same rules, so quoted fields with embedded commas and doubled quotes round-trip correctly.
Pitfalls to Know
- Headers come from the first object. If later objects have extra keys, those columns are silently dropped — make sure every object has the same shape, or reorder so the most complete object comes first.
- Nested objects aren't expanded. A value like
{"address": {"city": "Berlin"}}won't become anaddress.citycolumn. Flatten nested structures before converting. - CSV → JSON yields strings.
agecomes back as"30", not30— CSV has no type information. Cast numbers and booleans in your code afterwards. - Excel and semicolons: in many European locales Excel expects semicolon-separated files. This tool reads and writes standard comma-separated CSV; use Excel's import wizard (Data → From Text/CSV) to set the delimiter explicitly.
Privacy
Conversion runs entirely in your browser — your data never reaches a server, so customer lists and exports can be converted safely. Validate or tidy messy JSON first in the JSON formatter, and if your pipeline transports data as text, the Base64 encoder covers that step too.