CSV to JSON Converter
Turn CSV into a JSON array, with the delimiter detected and numbers typed for you
Your JSON shows up here
Paste CSV on the left or import a file. You get a table preview and the JSON text, ready to copy or download.
Turn CSV into a JSON array, with the delimiter detected and numbers typed for you
Your JSON shows up here
Paste CSV on the left or import a file. You get a table preview and the JSON text, ready to copy or download.
The CSV to JSON Converter reads comma, semicolon, tab or pipe separated text and turns each row into a JSON object keyed by the header row. It follows RFC 4180, the most widely cited description of the format: a value in double quotes may contain the delimiter, line breaks and doubled quotes, and spaces around a value are kept as data. Where real files bend those rules, it reads on rather than refusing the file: a quote in the middle of an unquoted value is an ordinary character, and text after a closing quote stays in the value, with a note saying so. The delimiter is detected from the first rows, and the tool says which one it picked. Numbers, true and false, null and cells that hold JSON arrays or objects become real JSON values, while values like 007 or a 20-digit ID stay text, because turning them into numbers would change them. Headers written with dots, such as user.city, can be rebuilt into nested objects, and blank or repeated headers are renamed so no column overwrites another.
The guide behind this tool
CSV Has No Types: What Goes Wrong When You Turn It into JSON
Commas inside quotes, semicolons from Europe, 007 that must stay text and 18-digit IDs that a number would round. What a CSV reader has to get right.
Paste the CSV into the left box, or import or drop a .csv, .tsv or .txt file onto it.
Check the table preview and the notes above it, which name the delimiter found and any rows with a different number of fields.
If the first row is data rather than column names, untick First row is the header.
Choose Array of objects for keyed records or Array of arrays for plain rows, and the indentation you want.
Untick the type detection if every value must stay a string, or tick the nested option to turn user.city headers into objects.
Switch to the JSON view to read the result, then copy it or download a .json file.
It splits the first 20 rows with each candidate (comma, semicolon, tab and pipe), respecting quoted values, and picks the one that gives the same number of fields on the most rows. A delimiter that leaves every row as a single field is ruled out. The choice is shown above the result, and you can override it with the Delimiter buttons.
81+ Free Tools
Explore all categories
From text processing to developer utilities, all free, all instant, no sign-up.