CSV to JSON
Paste or upload a CSV file and get clean JSON back instantly, headers become object keys, numbers and booleans are detected automatically.
Click to choose a .csv file, or drag and drop it here
Or paste CSV text directly into the box below.
Output
How it works
Files are read with the browser's FileReader API and parsed by a hand-written
single-pass parser that follows RFC 4180 rules: it walks the text character by character
while tracking whether it's inside a quoted field. That's the part naive
split-on-comma converters get wrong: inside quotes, commas and even line breaks belong to
the cell, and a doubled quote ("") is a literal quote character. Delimiter
auto-detection is pragmatic rather than clever: it counts commas, semicolons, and tabs in
the first line and picks the winner, which handles the semicolon-delimited CSVs that
European Excel exports produce.
Type coercion is where you should look twice at the output. Values that look like
integers or decimals become JSON numbers, and true/false become
booleans. That's usually what you want, but it means values with leading zeros, like ZIP
codes or phone extensions, come out as numbers: 01234 turns into
1234. If a column is an identifier rather than a quantity, verify it after
converting. Missing trailing cells in short rows become empty strings rather than
crashing the row.
Parsing, coercion, and even the .json download (built from an in-memory
Blob) all happen inside this page's JavaScript. Open DevTools' Network tab
while converting: no request carries your data, so customer lists and exports never leave
your machine.
Common questions
How is the delimiter detected?
Auto-detect counts commas, semicolons, and tabs in the first line and picks whichever appears most, which correctly handles most real-world exports. You can also set it manually.
What happens to quoted fields?
Fields wrapped in double quotes can contain commas or newlines safely, and a doubled quote (\"\") inside a quoted field is treated as a literal quote character, standard CSV escaping.
Are numbers and booleans converted automatically?
Yes. A field that looks like a whole number, decimal, true, or false is converted to that type in the JSON output rather than staying a string. Turn this off by editing the value if you need it kept as text.