CSV to JSON Converter
Convert CSV to JSON online: delimiter auto-detect, header row, numbers and booleans typed correctly, ragged-row warnings. Files up to 20 MB stay on your device.
How to use CSV to JSON
- 1Paste your CSV or open a .csv, .tsv or .txt file.
- 2Check the detected delimiter and switch the header row or type detection on or off.
- 3Copy the JSON or download it as a .json file.
What makes it better
- Delimiter is detected for comma, semicolon, tab and pipe files, or set it yourself
- Numbers, true/false and null become real JSON values; 007 and long IDs stay text
- Warns when rows have more or fewer cells than the header and tells you the first one
- Unclosed quotes are reported with the line and column
- Pretty-printed with 2 or 4 spaces, or minified
About CSV to JSON
CSV to JSON converts comma, semicolon, tab or pipe separated text into an array of objects keyed by your header row, or into an array of arrays when there is no header. Quoted cells, embedded commas and line breaks inside quotes are read the way spreadsheets write them, and inputs up to 20 MB are processed in a background worker so the page stays responsive.
Common uses
- Load a spreadsheet export into a JavaScript or Python script as JSON.
- Turn a CSV of products or pincodes into a seed file for an API or a database import.
- Convert survey or form-response exports into JSON for a dashboard.
- Check how a messy CSV with quotes and commas inside cells really parses.
Example
Input
id,name,city,paid 1,Asha,Chennai,true 2,Ravi,"Pune, MH",false 3,Meera,Kochi,true
Result
[
{
"id": 1,
"name": "Asha",
"city": "Chennai",
"paid": true
},
{
"id": 2,
"name": "Ravi",
"city": "Pune, MH",
"paid": false
},
{
"id": 3,
"name": "Meera",
"city": "Kochi",
"paid": true
}
]Good to know
- Type detection only converts exact forms: 42, -3.5, 1e6, true, false and null. Values with leading zeros (007), plus signs (+91…) or 16 or more digits are kept as text so IDs and phone numbers are never changed.
- With a header row, duplicate or empty column names are made unique (name, name_2, column_3). A row longer than the header keeps its extra cells under generated column names instead of dropping them.
- CSV has no date type, so dates stay strings such as 2024-03-01; JSON numbers above 2^53 cannot be exact in JavaScript, which is why very long digit strings stay text.
CSV to JSON FAQ
How do I convert a CSV file to JSON?
Paste the CSV or open the file, leave First row is header on, and copy the result. Each data row becomes one object whose keys are the header cells, so a three-column file gives an array of three-key objects.
Why did my numbers become strings, or my strings become numbers?
Switch Detect types on to get numbers, true/false and null, or off to keep every cell as text. Even with detection on, leading-zero and very long digit values such as 007 or a 16-digit card number stay as strings on purpose.
Can I convert a semicolon or tab separated file?
Yes. Auto-detect looks at the first lines and picks comma, semicolon, tab or pipe, and you can force one from the Delimiter menu when a file has too few lines to detect reliably.
What happens to a CSV without a header row?
Turn off First row is header and the output becomes an array of arrays, one inner array per line, with every cell in the order it appears. Nothing is renamed or skipped.
Is my CSV uploaded anywhere?
No. Parsing and conversion happen in your browser, in a background worker for large files, and the text is not sent to any server or stored after you close the tab.