CSV ↔ JSON Converter
Convert CSV to JSON and back — with real RFC 4180 quoting (not a naive comma split), delimiter auto-detection, optional type inference, and a live grid preview.
{{ error.title || 'Could not parse this' }}
Line {{ error.line }}
{{ error.msg }}
{{ output }}{{ parsedRows }} row{{ parsedRows === 1 ? '' : 's' }} detected — delimiter: {{ detectedDelimiterLabel }}
{{ w }}
Preview
| {{ c }} |
|---|
| {{ cell }} |
Both directions are converted entirely in your browser. Nothing you paste or upload is ever sent to a server.
Why CSV parsing needs more than splitting on commas
A field can legally contain a comma, a line break, or a literal quote character — RFC 4180 handles
this by quoting the field and doubling any internal quote ("said ""hi"""). Splitting on
commas naively breaks the moment any real-world export includes an address, a note, or a name with a
comma in it. This tool parses with those quoting rules from the start, and reports a precise line
number if a quoted field is left unclosed rather than silently misreading the rest of the file.
Going from JSON to CSV, the harder problem is the opposite direction: JSON objects in an array can each have different keys. This tool collects the full set of columns across every row first, so a key that's missing on one row becomes an empty cell rather than a dropped column or a misaligned row.
What "infer types" actually does — and why it's off by default
Every value in a CSV file is, strictly speaking, text. A cell that reads 36 or
true is only a number or a boolean if you decide it should be — CSV itself carries no
type information. Turning on "Infer numbers/booleans" applies that judgment call for you
automatically; leaving it off keeps every value exactly as written, which is the more honest default
since it's what the file actually contains.
Frequently asked questions
Why not just split on commas?
A field can legally contain a comma, a quote, or a line break — RFC 4180 handles this with quoting (`"Smith, John"`) and doubled internal quotes (`"said ""hi"""`). Splitting on commas naively breaks the moment any real export includes an address or a note with a comma in it.
Why is "infer types" off by default?
Every CSV value is text — a cell reading `36` or `true` is only a number or boolean if you decide it should be, since CSV itself carries no type information. Leaving inference off keeps every value exactly as written, which is the more honest default.
What happens if my JSON objects have different keys?
The full set of columns is collected across every object first, so a key missing on one row becomes an empty cell rather than a dropped column or a misaligned row — the header row always reflects every key seen anywhere in the array.
What does the delimiter auto-detection do?
It counts commas, semicolons, tabs and pipes on the first line (ignoring ones inside quotes) and picks whichever appears most — shown so you can override it if it guesses wrong, rather than silently assuming comma.
Is my data uploaded anywhere?
No. Both directions are parsed and converted entirely in your browser using JavaScript. Nothing is transmitted to a server.