CSV to JSON Converter
Paste CSV or drop a spreadsheet export to get a JSON array of objects. The delimiter is detected for you, and numbers and booleans become real JSON values. One of our free JSON tools.
CSV
JSON
How to convert CSV to JSON
- Step 1
Add the CSV
Paste it or drop a .csv or .tsv file. The delimiter is detected for you.
- Step 2
Set the options
Keep First row is header for an array of objects, and Infer types for real numbers and booleans.
- Step 3
Use the JSON
Copy or download data.json, or send it to the JSON formatter or JSON to TypeScript.
Worked example
id and paid become a number and a boolean, and the ZIP codes stay strings so their leading zeros survive.
id;name;zip;paid
1;Müller GmbH;01067;true
2;"Rossi; Figli";00184;false [
{
"id": 1,
"name": "Müller GmbH",
"zip": "01067",
"paid": true
},
{
"id": 2,
"name": "Rossi; Figli",
"zip": "00184",
"paid": false
}
] Delimiter detection
"CSV" files use different separators depending on where they came from. Excel in much of Europe writes semicolons, database exports often use tabs, and some systems use pipes. With the delimiter on Auto, the converter tries comma, semicolon, tab and pipe and picks the one that splits every row into the same number of fields. The footer shows which one it chose; pick one yourself if a file is ambiguous, for example a single-column list.
Headers and keys
With First row is header on, each later row becomes an object whose keys are the header names. Blank headers become column_1, column_2 and so on, and repeated header names get a suffix (name, name_2) so no column overwrites another. Turn the option off to get an array of arrays instead, which suits files without a header or data you will process by position.
Rows with more or fewer cells than the header are kept: extra cells get column_N keys and missing cells are empty. A warning tells you how many rows were uneven, which usually points to an unquoted delimiter inside a value.
Type inference
CSV has no types; every cell is text. With Infer types on, cells that are written exactly like JSON numbers become numbers, true and false in any common capitalisation become booleans, and empty cells and null become null. Anything that would change if it were converted stays a string: values with leading zeros like ZIP codes, phone numbers and account numbers, and whole numbers too long to store exactly, such as 19-digit IDs. Dates stay strings too, because JSON has no date type. Turn inference off to keep every value as the exact text from the file.
Quoted cells
Cells are read following RFC 4180. A cell wrapped in double quotes can contain the delimiter and even line breaks, and two double quotes in a row stand for one quote character. If a quote is opened and never closed, the converter stops with an error that names the row, instead of quietly merging the rest of the file into one cell.
Nested output
Tick Nest dot paths to rebuild structure from flattened headers: address.city and address.zip become an address object, and tags.0, tags.1 become an array. That makes this the reverse of JSON to CSV. A byte order mark at the start of the file, which Excel adds to UTF-8 exports, is removed automatically.
Questions and answers
Can I convert an Excel file?
Save the sheet as CSV first (File, Save As, CSV UTF-8), then open that file here. The converter reads text formats only: CSV, TSV and other delimited text.
Why did my ZIP codes stay as text?
Values with leading zeros, such as 01067 or 007, keep their zeros only as strings, so type inference leaves them alone. Whole numbers too large to store exactly, like long IDs, also stay strings.
Does it handle semicolon CSV from European Excel?
Yes. Auto detection checks commas, semicolons, tabs and pipes and picks the one that splits the rows consistently. The footer shows which one it used, and you can choose one yourself.
What if a cell contains the delimiter or a line break?
Quoted cells are read the standard way (RFC 4180): delimiters and line breaks inside double quotes stay part of the value, and a doubled quote ("") becomes one quote character.
Is my CSV uploaded?
No. The file is read with your browser's FileReader and converted in the page. Large files are processed in a Web Worker on your device.
Related tools
All JSON & Schema toolsNext step
Need this built into your stack?
The team behind SyntaxSnap builds custom code generators, internal developer tools and API integrations.