CSV to JSON
Convert CSV to JSON and back, with quoting handled properly.
Converting both ways
Paste CSV and get a JSON array โ first row as keys, types detected so 34 becomes a number and true a boolean, leading-zero values like ZIP codes wisely left as strings. Paste a JSON array and get CSV back, with keys unioned across objects. Comma, semicolon, tab and pipe delimiters; download as file either way. Everything parses locally.
Why split-on-comma corrupts real files
Real CSV allows commas inside quoted fields ("Reyes, Ana"), quotes escaped by doubling (""wrangler""), and even newlines inside a field โ the RFC 4180 rules this parser implements and naive splitting destroys. European exports add a twist: with comma as the decimal separator, their CSVs use semicolons, which is what the delimiter switch is for.
Type detection has a sharp edge worth respecting: phone numbers and postcodes with leading zeros must stay strings (01234 โ 1234), and IDs beyond 15 digits lose precision as JSON numbers โ the JSON guide covers that trap in detail. Turn detection off to keep everything stringly-safe. Validating and pretty-printing the output is the JSON formatter's job.
Frequently asked questions
How do I convert CSV with commas inside values?
Quoted fields are handled properly โ "Reyes, Ana" stays one value. That RFC 4180 parsing is exactly what naive converters get wrong.
Why are my ZIP codes losing their leading zeros?
They would if treated as numbers โ so this converter keeps leading-zero values as strings even with type detection on. Turn detection off to keep every field a string.
My CSV uses semicolons โ why?
European locales use comma as the decimal separator, so their CSV dialect separates fields with semicolons. Switch the delimiter option to match.
Can I convert JSON back to CSV?
Yes โ an array of objects becomes rows with a header of all keys, and values containing commas or quotes are escaped correctly.