How to convert CSV to JSON
- Paste your CSV or open a
.csvfile. The delimiter is detected automatically, or you can choose it yourself. - Keep First row is the header to use the column names as keys. Without a header, every row becomes an array of values.
- Copy or download the JSON. Columns named like
address.citybecome nested objects while the dot-path option is on.
How CSV values are converted
| CSV cell | JSON value |
|---|---|
42, -1.5, 2e3 | number, digits kept exactly |
true, false | boolean |
null | null |
| empty cell | "" (empty string) |
007, +49 30 1234 | string – leading zeros and plus signs are kept |
["a","b"], {"x":1} | parsed as a JSON array or object |
| anything else | string |
Switch off Detect numbers, booleans and null to keep every value as a string.
Quotes, line breaks and other CSV details
The parser follows RFC 4180: fields may be wrapped in double quotes, a quote inside a field is written as two quotes (""), and quoted fields may contain delimiters and line breaks. Windows (CRLF) and Unix (LF) line endings and a UTF-8 byte order mark are handled automatically. Empty or duplicate column names are renamed (column3, name_2), so no data is lost.
Frequently asked questions
How do I convert an Excel file to JSON?
In Excel choose File → Save As → CSV UTF-8, then open that file here. Every row becomes a JSON object with the column headers as keys.
Why are some numbers strings in the JSON?
Values with leading zeros (such as ZIP codes) or a plus sign stay strings so that nothing is lost. If every value is a string, check that Detect numbers, booleans and null is switched on.
Can I get nested JSON from a CSV file?
Yes. Name the columns with dot paths such as user.name and user.email and keep the dot-path option on – they become {"user": {"name": …, "email": …}}.
Which delimiter does my file use?
The converter tries commas, semicolons, tabs and pipes and picks the one that splits every line into the same number of fields. You can override the choice in the Delimiter menu.