CSV to JSON
Convert CSV to JSON in your browser. Choose objects, arrays or columns, optionally type numbers and booleans, and keep leading zeros intact.
Related tools
All Data tools →This tool runs entirely in your browser. Nothing you enter is sent to our servers, so there is nothing for us to store or see.
About the CSV to JSON
Paste CSV and get JSON back as you type. The conversion runs entirely in this page on your own device, so a file of customer records or exported analytics is never uploaded anywhere.
Three output shapes are offered because they answer different questions. An array of objects is what an API or a JavaScript map() wants, and it is the default. An array of arrays keeps the grid exactly as it was, which is what you want when the column order carries meaning or the headers are duplicated. A column object groups every value under its heading, which is the shape a plotting library or a dataframe expects.
Type conversion is optional, and off by default, because that is the honest setting. Turning it on converts true, false, null and numbers to their JSON equivalents — but only values that survive the round trip unchanged, so a product code like 00714 and a sixteen-digit account number stay as strings rather than being silently reshaped into 714 and a rounded float. Left off, every value stays exactly the text it was in the file.
The delimiter is detected by counting separators outside quoted fields, so one address reading "Paris, France" cannot outvote a genuinely semicolon-separated export. Quoted fields, escaped quotes, embedded newlines and the byte-order mark Excel adds are all handled, and a duplicate column heading is suffixed rather than allowed to overwrite its twin.
How to use the CSV to JSON
-
Paste your CSV
Paste into the left pane, or drop a .csv file onto it — dropping reads the file locally and never uploads it. Load a sample if you want to see the shape first.
-
Choose the shape
Array of objects for an API or a loop, array of arrays to preserve the grid, column object for a chart or dataframe.
-
Decide about types
Leave type conversion off to keep every value as text, which is safe for codes and identifiers. Turn it on when you need real numbers and booleans.
-
Copy or download
The JSON appears on the right as you type. Copy it, or download it as a .json file.
Frequently asked questions
Is my data uploaded anywhere?
No. The conversion runs inside your browser and nothing is sent to a server. You can disconnect from the internet once the page has loaded and it will keep working exactly as before, which is the simplest way to confirm it.
Why are my numbers coming out as strings?
Because type conversion is off by default, which keeps every value exactly as the file had it. Turn on "Convert numbers and booleans" if you want real JSON numbers. The default is deliberate: converting is lossy for anything that only looks numeric, such as a postcode or an order number with a leading zero.
Will a code like 00714 survive?
Yes, in both modes. With type conversion off everything stays a string; with it on, only values that convert back to exactly the same text are treated as numbers, so 00714 and 1,234 and +1 all stay strings. This is the single most common way a CSV import turns out to be quietly wrong.
What happens to duplicate column headings?
The second and later ones are suffixed, so three columns called "notes" become notes, notes_2 and notes_3. A JSON object cannot hold the same key twice, so without this the last column would silently overwrite the other two and you would lose data without any warning.
My file has no header row. What then?
Untick "First row is a header" and the columns are named Column 1, Column 2 and so on, with every row of the file treated as data. Choosing the array-of-arrays shape avoids inventing names at all, since it keeps the grid exactly as it stands.
Which delimiters are supported?
Commas, semicolons, tabs and pipes, detected automatically or set by hand. Detection only counts separators outside quoted fields, so a single field containing a comma cannot mislead it about a semicolon-separated file.