Convert CSV to JSON and back with the quoting rules done properly — embedded commas, doubled quotes, and multi-line fields survive both directions, because the parser is a real RFC 4180 state machine rather than a split-on-comma.
How to convert
- Pick the direction: CSV → JSON or JSON → CSV, and the delimiter (comma, semicolon, tab).
- Paste. With headers on, CSV rows become JSON objects keyed by the first row.
- Copy the result or download it as a file.
Why naive converters corrupt data
Split every line on commas and "Smith, John",42 becomes three fields. Real CSV wraps such
values in quotes, escapes quotes by doubling them, and even permits newlines inside a quoted
field — rules set down in RFC 4180 that spreadsheet exports follow and quick scripts don’t.
This converter parses those rules character by character, and its JSON→CSV direction re-quotes
by the same rules — so a round trip returns exactly what went in. Values stay strings on the
way to JSON, deliberately: type-guessing is how leading zeros vanish from ZIP codes.
The two directions, in practice
CSV → JSON feeds exports into code: an API body, a fixture file, a quick script over spreadsheet data. Header mode produces the array-of-objects shape everything expects; ragged rows pad safely. JSON → CSV goes the other way — API output into something Excel opens — unioning keys across objects so differing shapes still produce one coherent header row. Pretty-print or minify the JSON side with the JSON formatter, and clean duplicate rows with the dedupe tool before converting.
Private by design
CSV files are customer lists and financial exports more often than not. Conversion runs entirely in your browser — nothing is uploaded, logged, or kept.