CSV to JSON Converter - Convert CSV Files Online, Free
CSV to JSON converter
How the CSV to JSON conversion works
CSV is a table; JSON is a structure. This tool reads the table properly - including quoted fields and the awkward cases inside them - and writes it out as JSON you can drop straight into code.
Three steps
- 1 Drop a CSV file onto the box, or paste the text straight from a spreadsheet.
- 2 Leave the delimiter on automatic, or pick one yourself. Choose whether the first row is a header and whether numbers should become real numbers.
- 3 Press Convert, then copy the JSON or download it as a .json file.
Quoted fields are where most converters break
Splitting a line on every comma looks right until a value contains one. "New York, NY" is a single field, not two; a doubled quote ("") means one literal quote character; and a quoted field may even contain a line break. This converter follows the CSV rules for all three, so columns stay where they belong instead of quietly shifting.
An example, side by side
Notice what happens to the tricky parts: the doubled quotes become one quote inside the string, the comma inside "New York, NY" stays part of the value, and the empty trailing cell becomes null rather than an empty string.
name,city,note Ada,London,"Loves ""tea""" Grace,"New York, NY",
[
{
"name": "Ada",
"city": "London",
"note": "Loves \"tea\""
},
{
"name": "Grace",
"city": "New York, NY",
"note": null
}
]
Commas, semicolons and tabs
A file called CSV is not always comma separated. Spreadsheets in many locales save with semicolons, and exports from databases often use tabs. Automatic detection tries each candidate and keeps the one that gives a consistent column count across rows - a better test than simply counting characters, because a text column full of commas can easily outnumber the real delimiter.
Your file stays on your computer
Reading and parsing both happen in the browser, so nothing is uploaded and nothing is stored. That matters here more than in most tools: a CSV is usually a customer list, an order export or a payroll sheet. You can disconnect from the network and the converter keeps working.