CSV to JSON Converter

Paste CSV (or copy straight from a spreadsheet) to convert it into a clean JSON array of objects. Headers, commas inside quotes and tab-separated data are handled — and it all runs in your browser.

Paste CSV above and press Convert to JSON.

How the conversion works

CSV (comma-separated values) is a flat table: one row per line, fields separated by a delimiter. JSON represents the same table as an array of objects, where each object's keys come from the header row:

header row keys   ·   each data row one object

The converter reads the first row as field names, then maps every following row's values onto those names, producing a list of objects that's ready to use in code, a database import or an API payload.

Worked example

The CSV name,city / Ada,London becomes:

Header: name, city → the object keys.
Row: Ada, London → the values.
JSON: [{"name":"Ada","city":"London"}].

Quoting and edge cases

Real CSV is trickier than "split on commas". A field wrapped in double quotes can contain the delimiter itself ("London, UK" stays one value), and a doubled quote ("") inside means a literal quote. This parser respects quoting, trims a trailing blank line, and can auto-detect commas, tabs or semicolons. Copying a range straight from a spreadsheet usually pastes as tab-separated data, which auto-detect handles.

Tip: once you have JSON, tidy or minify it with the JSON formatter.

Frequently asked questions

How does CSV become JSON?

The first row becomes the object keys, and every later row becomes one object whose values are matched to those keys. The result is a JSON array of objects representing your table.

Does it handle commas inside a field?

Yes. Fields wrapped in double quotes may contain the delimiter, so "London, UK" stays a single value. Doubled quotes inside a quoted field become a literal quote character.

Can I convert tab-separated data from a spreadsheet?

Yes. Copying cells from Excel or Google Sheets usually pastes as tab-separated values, and the auto-detect delimiter recognises tabs as well as commas and semicolons.

What if my data has no header row?

Choose 'first row is data' and the converter names the columns col1, col2, col3 and so on, keeping every row including the first as data.

MB
Mustafa Bilgic · Editor, Calcool
Parsing follows the common CSV conventions of RFC 4180 (quoted fields, escaped quotes). Output is produced with the browser's JSON serializer. Everything runs in your browser — nothing you enter is uploaded, logged or stored.

Related calculators