Convert CSV to JSON

Turn a CSV into JSON objects or arrays, with quoted commas, line breaks inside fields and semicolon files all handled.

Or paste into the box below.

Your data is converted on this device. Nothing is uploaded.

The four things a CSV does that break naive converters

Commas inside quotes
"Smith, Jane" is one field, not two.
Doubled quotes
"Said ""hello""" is the text Said "hello".
Line breaks inside a field
A quoted address or note can span several lines and is still one cell.
A byte order mark
Excel writes an invisible character at the start of the file, which ends up glued to the first header name unless it is removed.

All four are handled. The preview above the output shows the first rows as parsed, so a wrong delimiter or a shifted column is visible before you use the JSON.

Types and when to leave them alone

JSON distinguishes numbers, booleans and text; CSV doesn’t. Detection turns obvious numbers and true or false into their JSON types and empty cells into null. Anything with a leading zero and any number too long to survive as a JavaScript number, stays as text, because silently rounding a long order ID is worse than leaving it quoted.

Common questions

Why do other converters mangle my columns?

Because they split on every comma. A quoted field such as "Smith, Jane" contains a comma that is data, not a separator and a field can also contain a doubled quote or a line break. This reads the file character by character, the way the CSV standard describes, so those survive.

My file uses semicolons. Will that work?

Yes. Excel in much of Europe writes semicolons, because the comma is the decimal separator there. The delimiter is detected from the first lines of the file, counting only outside quotes and you can override it if the guess is wrong.

Why is my postcode still a string?

On purpose. A value with a leading zero, such as 01234 or 007, is almost always an identifier rather than a number and converting it drops the zero forever. Number detection only converts values that are unambiguously numbers.

What does the header option change?

With it on, the first row names the fields and each later row becomes an object with those names as keys. With it off, every row becomes an array, which suits files that have no header or where the column order is what matters.

Is my data uploaded?

No. The conversion runs in this tab. That matters for the customer lists, exports and reports that make up most CSVs, which shouldn’t be pasted into a service that keeps a copy.

Guides

The other tools

All of them work the same way: the file is read in your browser and never uploaded.