Developer
Encoders, converters & dev utilities
CSV to JSON Converter
Convert CSV (comma-separated values) into a JSON array of objects, using the first row as the keys. The parser is a proper RFC 4180 state machine — it correctly handles quoted fields that contain commas, escaped double-quotes ("" → "), and newlines embedded inside a quoted field, so messy real-world exports round-trip cleanly. Type inference is on by default: cells that look like a number, true, false or null are coerced to the matching JSON type, and you can toggle it off to keep every value as a string (useful for zero-padded IDs like 007 or codes like 1e3). Output is emitted per RFC 8259. Everything runs in your browser — nothing is uploaded. Free, no login.
First CSV row becomes the object keys; each following row becomes one JSON object
- Worked example — id,name then 1,Ada → [{"id":1,"name":"Ada"}]
- RFC 4180 parsing: quoted fields may contain commas, newlines, and "" (an escaped double-quote)
- Type inference (toggle): 1→number, true/false→boolean, null→null; off = keep everything as strings
- JSON output per RFC 8259; runs 100% client-side — the CSV never leaves your browser
Frequently asked questions
How do I convert CSV to JSON?
Paste your CSV with a header row on top. The first row supplies the keys and every subsequent row becomes one object in the output array. So the CSV id,name / 1,Ada converts to [{"id":1,"name":"Ada"}]. The parser follows RFC 4180, so quoted fields containing commas or newlines are handled correctly, and the whole conversion runs in your browser without uploading the data.
Why did my "007" turn into the number 7?
Because type inference is enabled by default — cells that look numeric or boolean are coerced to JSON numbers/booleans (and null becomes JSON null). For values that must stay text — zero-padded IDs like 007, phone numbers, or codes like 1e3 — turn off type inference so every cell is emitted as a string. RFC 4180 CSV has no type system, so inference is a convenience you control, not a guarantee.
Does it handle commas and line breaks inside a field?
Yes. The parser is an RFC 4180 state machine, so a field wrapped in double-quotes may contain the delimiter (a comma), a line break, or an escaped double-quote written as "". For example the single field "Ada, ""the"" Countess" is parsed as the string Ada, "the" Countess rather than being split on the inner comma. Both \r\n and a lone \n (or \r) are treated as record separators.