Convert CSV to JSON — and back again
Paste a CSV table and get JSON straight away: the delimiter is detected, the header row too, and numbers and booleans are typed on request. The reverse direction flattens nested objects into dot notation. A table preview and a per-row error list show immediately where a file goes wrong. Everything runs in your browser, with no upload and no sign-up.
What actually counts as a valid CSV file?
The reference text is RFC 4180 from October 2005, titled "Common Format and MIME Type for Comma-Separated Values (CSV) Files". It describes a surprisingly small core: fields separated by commas, lines terminated by CRLF, fields containing a comma, quote or line break wrapped in double quotes, and a quote inside a field doubled.
The document itself notes that no formal specification exists that everyone follows — and that shows in practice. German Excel versions write semicolons because the comma is taken as the decimal separator. Export tools use tabs. Some systems quote every field, others quote none. That is why this tool guesses the delimiter instead of prescribing one, and always lets you override the guess.
How is the delimiter detected?
Across the first 20 non-empty lines the tool counts how often comma, semicolon, tab and pipe occur outside of quoted fields. The winner is the character whose count is identical in as many lines as possible. Consistency beats frequency: a semicolon file with commas inside address fields is recognised correctly, because the comma count varies from line to line while the semicolon count does not.
Why do ZIP codes stay text?
Because 01067 would otherwise turn into 1067. Typing deliberately converts only what matches the JSON number format exactly:
42,-3.5,1e3become numbers01067,+5,1.234,00,0049 30 123456stay texttrueandfalse(any capitalisation) become booleans- empty fields and
nullbecome null
That is the conservative reading: better one value converted too few than a product code, IBAN or phone number destroyed. If you want everything as text, simply switch typing off.
How do nested objects become columns?
CSV only knows flat tables, JSON does not. Going from JSON to CSV therefore uses dot notation:
| JSON | CSV column |
|---|---|
{"address": {"city": "Berlin"}} | address.city |
{"tags": ["new", "premium"]} | tags.0, tags.1 (or one column joined by ; ) |
{"note": null} | empty cell |
Column order follows first appearance, missing keys become empty cells. A dot inside a key name itself produces an ambiguous column name — the well-known price of this notation, and not something that can be resolved cleanly.
Honest limits
Everything runs in a single browser tab. Beyond a few megabytes typing gets sluggish, and above roughly 20 million characters the tool refuses to process at all so the tab stays usable. The delimiter guess works line by line and can be wrong when fields contain many line breaks — then set the delimiter manually. For gigabyte-sized exports, csvkit, jq or a small script are the right tools, not a browser tab.