CSV to JSON
To convert CSV to JSON, paste the data or load a file, check the detected delimiter and download the JSON. The first row becomes the keys of each object, numbers and true/false become real values, and codes with leading zeros such as 00042 stay as text. Quoted commas and line breaks are handled. Nothing is uploaded.
Updated
How to use CSV to JSON
- 1Paste CSV, or load a .csv or .tsv file.
- 2Check the delimiter — it is detected automatically — and whether the first row is a header.
- 3Choose whether to detect numbers and whether to nest dotted headers such as address.city.
- 4Copy the JSON or download it as a .json file.
How it works
The parser follows RFC 4180, the closest thing CSV has to a standard. A value wrapped in double quotes may contain the delimiter, a line break or a doubled quote ("") that stands for one quote mark. A byte-order mark at the start, CRLF or LF line endings and a missing final line break are all accepted.
The delimiter is detected by parsing the first lines with a comma, semicolon, tab and pipe, and choosing the one that gives the most columns consistently. Separators inside quoted values are ignored, so an address with a comma does not fool it.
With type detection on, a cell becomes a number only when nothing can be lost: 3.5 and -12 become numbers, but 00042 keeps its leading zero and a 19-digit ID stays text because JavaScript numbers hold only about 15 significant digits exactly. TRUE and false become booleans, and empty cells become null.
Duplicate or blank header names are made unique (name, name_2, column3), so no column silently overwrites another. Rows with fewer cells get null for the missing values, and extra cells get their own column.
Everything runs in this page. Nothing you paste is transmitted, logged or stored, which is what makes it safe to drop a production payload in here while you are debugging.
Worked example
Two rows with a header, one value containing a comma
- id,name,postcode
- 1,"Hopper, Grace",01234
- → [{ "id": 1, "name": "Hopper, Grace", "postcode": "01234" }]
Result: The quoted comma stays inside the name, and the postcode keeps its leading zero as text.
Tips and common mistakes
- Export from spreadsheets as “CSV UTF-8” so accented characters survive.
- If every record lands in one field, the delimiter is wrong — pick it manually.
- Use dotted headers such as address.city with nesting on to build nested JSON from a flat sheet.
- Check the record count against the row count in your spreadsheet before using the output.