CSV is how spreadsheets and databases export data, but code and APIs almost always want JSON. Converting between them by hand is tedious and error-prone — especially when fields contain commas or quotes. Here's how to do it cleanly and safely in your browser, with examples.

What the conversion looks like

Given a CSV with a header row of name, age, active and rows for Ada (36, true) and Alan (41, false), a good CSV-to-JSON conversion produces an array of objects that use the header row as the keys — for example an object with name set to "Ada", age set to the number 36 and active set to the boolean true, and a second object for Alan. The CSV to JSON tool does this instantly — paste your CSV, then copy or download the JSON.

Headers as keys, and typed values

Two options make the output genuinely useful. Keep "First row is header" on so your column names become the object keys. Turn on "Detect numbers & booleans" so values like 36 and true become real JSON numbers and booleans instead of strings — which is what most code expects. Turn that off if you need everything kept as text, for example ID codes with leading zeros.

Handling commas and quotes inside fields

The tricky part of CSV is fields that themselves contain commas or line breaks — like a city written as "London, UK". Proper CSV wraps those in double quotes, and escapes internal quotes by doubling them. A good converter follows these rules so that value stays a single field rather than splitting in two. The tool also supports semicolon, tab and pipe delimiters, which are common in European spreadsheets and exports from Excel or Google Sheets.

Privacy and related tools

Because the conversion runs entirely in your browser, your data is never uploaded — which matters for private or sensitive spreadsheets. Once you have JSON, tidy it with the JSON Formatter, or turn the same data into a printable table with CSV to PDF. For free-form text rather than tabular data, use Text to JSON.