CSV to JSON Converter
CSV to JSON turns a spreadsheet export into structured JSON. Paste the text or open the file, and each row becomes an object keyed by the header row. Quoted fields, embedded commas and line breaks inside a value are parsed correctly, and the delimiter is detected for you.
Runs entirely in your browser — nothing you enter is uploaded.
DataType detection is deliberately conservative: values like 007 and +44 20… stay strings so zip codes and phone numbers keep their exact form.
About CSV to JSON conversion
CSV is less simple than it looks: a field may be quoted, a quoted field may contain commas, line breaks and escaped quotes, and the delimiter is not always a comma. Exports from European locales commonly use semicolons, because the comma is the decimal separator there. The delimiter is detected from the header rather than assumed, and you can override it.
Type inference is deliberately conservative, and the reason is the bug it
avoids. A value like 007 or +44 20 7946 0958 looks
numeric to an eager parser, which converts it and destroys the leading zero
or the plus — silently corrupting postcodes, phone numbers and product codes.
Only values matching a strict JSON number pattern are converted; everything
else stays a string, and inference can be switched off entirely.
Common questions
- Why is 007 kept as text instead of becoming a number?
- Because converting it would destroy the leading zeros, and values like that are almost always identifiers rather than quantities — postcodes, product codes, phone extensions. Only values matching a strict number pattern are converted, which excludes anything with a leading zero, a plus sign or spaces. This is the single most common way a naive CSV import corrupts data.
- My file uses semicolons rather than commas. Will it work?
- Yes. The delimiter is detected from the header row, so semicolon-separated exports are handled automatically. These are common from European locales, where the comma is the decimal separator and so cannot also separate fields. Tab-separated files work the same way, and you can set the delimiter yourself if detection gets it wrong.
- Does it handle commas and line breaks inside a value?
- Yes, provided the field is quoted, which is how the CSV convention expresses it. A quoted field may contain the delimiter, line breaks and escaped double quotes, and it is parsed as a single value. This is why a proper parser is needed and why splitting on commas gives wrong results on real exports.
- What happens to the header row?
- Its cells become the keys of every object. If your file has no header row you can turn that option off, and rows are emitted as arrays of values instead. Duplicate header names are a problem worth knowing about, since an object cannot have two identical keys — rename them in the source if you have them.