How to convert CSV to JSON
Paste CSV or drop a .csv file onto the input. The first row is treated as the header, and every following row becomes an object whose keys are the header names. The delimiter (comma, semicolon, tab or pipe) is detected automatically from the first lines, or you can pick it yourself.
The parser follows RFC 4180: fields in double quotes may contain delimiters, doubled quotes and even line breaks, and both Windows and Unix line endings are accepted. A leading byte order mark, which Excel adds to UTF-8 files, is ignored.
With Detect numbers and booleans on, 42 becomes a number, true becomes a boolean and null becomes null. Switch it off if you need every value as a string, for instance to keep leading zeros in postcodes. Values that would lose precision as numbers, such as 20-digit IDs, are kept as strings automatically. Tick Nest a.b headers to turn a header like address.city into a nested object. If your file has no header row, untick the header option and you get an array of arrays.
Worked example
Input:
id,name,address.city,active
1,Ann,Paris,true
2,"Bob, Jr.",Rome,false
Output with nesting enabled:
[
{ "id": 1, "name": "Ann", "address": { "city": "Paris" }, "active": true },
{ "id": 2, "name": "Bob, Jr.", "address": { "city": "Rome" }, "active": false }
]
The quoted name Bob, Jr. stayed in one piece because the comma was inside quotes.
Common problems
- Everything lands in one field: the delimiter was guessed wrong. Choose it manually.
- Unterminated quoted field: a quote was opened and never closed, often from a stray
"inside an unquoted value. Fix or double that quote. - Duplicate headers: repeated names get a suffix (
id,id_2) instead of overwriting each other. - Empty header cells become
column1,column2and so on.
The reverse direction is available in the JSON to CSV converter.
Frequently asked questions
How does the tool decide which delimiter to use?
It counts commas, semicolons, tabs and pipes outside quotes in the first few lines and picks the most frequent. You can override the choice with the delimiter menu.
Are numbers converted automatically?
Yes, when type detection is on. Integers, decimals and exponent notation become numbers, and true, false and null become their JSON equivalents. Turn the option off to keep everything as text.
Can it handle line breaks inside a cell?
Yes. A quoted field may span several lines, and the line break is preserved inside the resulting JSON string.
What happens to rows with fewer or more columns than the header?
Missing cells become empty strings. Extra cells beyond the header are ignored, so check the data if your rows are ragged.