Local browser utility

CSV to JSON

Convert CSV into JSON in your browser with correct handling of quoted fields, embedded commas and newlines, and a plain report of any malformed rows.

1. Paste your CSV data

Enter or paste your CSV data below. You can also drag and drop a .csv file.

2. CSV options

Choose the delimiter and parsing options.

Delimiter

Good to knowQuoted fields are parsed properly — a comma, a line break or a doubled quote inside "…" stays part of its field. Rows that do not fit the header are converted and listed, never dropped.

3. JSON output

Your JSON result appears here as you type.

Paste CSV on the left to see the JSON here.

Questions About This Tool

Does it handle commas inside quoted fields?

Yes. The parser tracks whether it is inside a quoted field, so a comma between quotes stays part of that field. It handles embedded line breaks and doubled quotes the same way, which is what RFC 4180 specifies.

What happens to a row with the wrong number of columns?

It is converted rather than dropped. Missing fields become null, surplus fields are kept as extra_1 and so on, and either way the row is listed under the output with its line number so you can check the source.

Why did my zip code stay a string?

Because it has a leading zero, and converting 01234 to the number 1234 destroys it. Values with leading zeros, and integers too large to hold exactly, are deliberately left as strings.

Can it produce nested JSON?

No. A CSV is a flat table, and turning one into nested objects requires a convention for encoding nesting in the column names. This tool converts the table as it stands.

Is my file uploaded to convert it?

No. The parsing happens in your browser. There is no upload, no server copy, and no request made while you convert — the network tab will show nothing.

My first column name looks odd — why?

Almost certainly a byte order mark. Excel writes one at the start of UTF-8 CSV exports, and it attaches to the first header name as an invisible character. Deleting the first character of that header in the source usually fixes it.