Reading CSV correctly
CSV looks trivial until a field contains a comma, a quote or a line break. RFC 4180 handles those by wrapping the field in double quotes and doubling any quote inside: "Smith, ""Jr.""". Splitting lines on commas breaks such files; this converter implements the full rules, so addresses, notes and descriptions come through intact.
The first row is used as the keys of each object. With detect types on, 42, 3.14, true, false and null become JSON numbers, booleans and null; values like 007 or 01310-100 stay strings, so ZIP codes and IDs keep their leading zeros.
Worked example
sku,name,price,in_stock
A-001,"Mug, large",12.5,true
B-002,"Poster ""Blue""",8,false
becomes an array of two objects: {"sku": "A-001", "name": "Mug, large", "price": 12.5, "in_stock": true} and {"sku": "B-002", "name": "Poster \"Blue\"", "price": 8, "in_stock": false}.
How this works
The page reads the text in one pass with an RFC 4180 parser: quoted fields can contain the delimiter, quotes (written twice) and line breaks, and records may end with CRLF or LF. The first record becomes the header unless you turn that off, in which case each row becomes an array. With type detection, a cell that is exactly a JSON number, true, false or null is converted; anything else, including numbers with leading zeros or decimal commas, stays a string. Use JSON to CSV for the reverse. Everything runs in this tab.
Frequently asked
My CSV uses semicolons. Does that work?
Yes. Choose the semicolon delimiter, common in exports from spreadsheets set to Brazilian, German or French formats.
Why did 007 stay a string?
Leading zeros are not allowed in JSON numbers, and they usually mean an identifier such as a ZIP code, so the page keeps the text.
Can fields contain line breaks?
Yes, if they are quoted, as RFC 4180 allows.
Is my file uploaded?
No. Everything runs in your browser.
Sources
- RFC 4180 — Common Format and MIME Type for CSV Files
- RFC 8259 — The JavaScript Object Notation (JSON) Data Interchange Format
- Wikipedia — Comma-separated values
Reviewed Oct 17, 2026 · test vectors fixtures/dev/csv-to-json/