Reading CSV is harder than it looks, and every difficulty in a CSV to JSON conversion comes from the CSV side. JSON has one specification and one meaning. CSV has a loose convention and a great deal of local variation, so the first job is working out what the file in front of you actually is.
Delimiters are the first question. Comma is the name of the format and semicolon is extremely common in European exports, because locales that use a comma as the decimal separator cannot also use it to separate fields. Tab-separated files are widespread in data work. A converter that guesses will usually guess right and is worth overriding when it does not, which shows up immediately as every row arriving as a single field.
Quoting is where correctness lives. A field containing the delimiter must be quoted, and a quoted field can contain the delimiter, newlines, and escaped quotes. This is why splitting a CSV on commas is wrong for any file containing an address or a free-text comment: the naive split breaks mid-field and every column after it shifts. A real parser tracks quote state, which is the difference between a conversion that works on your sample and one that works on the file.
The header row determines your JSON keys, so its quality is the output's quality. Duplicate column names, empty header cells, and names with leading or trailing spaces all produce keys you will then have to work around in code. It is worth fixing the header before converting rather than after.
Types are the decision that changes the result most. Everything in a CSV is text, so the converter must decide whether "123" becomes the number 123 or stays a string, and whether "true" becomes a boolean. Inferring types is convenient and it is how identifiers lose their leading zeros, how postcodes become integers, and how a column that is mostly numbers but occasionally contains a dash arrives with mixed types. Keeping everything as strings is lossless and puts the decision back on you, which for identifiers is usually the right place for it.
Encoding is the last trap. A CSV exported from a spreadsheet may be UTF-8, UTF-8 with a byte order mark, or a legacy regional encoding, and the symptom of getting it wrong is accented characters arriving as pairs of unrelated symbols. If names look mangled, the encoding was the problem rather than the conversion.
All of this happens in your browser. The file is read locally, parsed locally, and the JSON is produced locally, which matters because a CSV is very often a customer list, an order export or a payroll extract.