How to use the CSV to JSON converter
- 1Paste CSV into the CSV box, press Open file (
.csv,.tsvor.txt), or press Example. - 2Leave Delimiter on Detect, or choose comma, semicolon, tab or pipe. The footer shows which delimiter was used.
- 3Choose the Output shape, what to do with Empty cells, and whether to Detect numbers and true/false. Tick Nest dot.path headers to turn
address.citycolumns into nested objects. - 4Check the table preview, then press Copy or Download (
data.jsonordata.jsonl).
Example
id;name;city;active;zip 1;Ada;London;true;01234 2;"Grace; Admiral";New York;false;10001
[
{
"id": 1,
"name": "Ada",
"city": "London",
"active": true,
"zip": "01234"
},
{
"id": 2,
"name": "Grace; Admiral",
"city": "New York",
"active": false,
"zip": "10001"
}
]The semicolon delimiter was detected. The quoted "Grace; Admiral" stays one field. The zip column keeps its leading zero, so every zip stays text.
Headers and output shape
With First row is headers ticked, each row becomes an object keyed by the header names. Blank headers become column_1, column_2 and so on, and repeated headers get a suffix (name, name_2) so no value is overwritten. Untick it when the file has no header row.
| Output | Looks like | Use for |
|---|---|---|
| Array of objects | [{"id":1,"name":"Ada"}] | APIs, JavaScript, most uses |
| Array of arrays | [["id","name"],[1,"Ada"]] | Compact data, charts, spreadsheets in code |
| JSON Lines | one object per line | Logs, streaming imports, BigQuery |
Nest dot.path headers rebuilds structure: columns address.city and address.zip become "address": {"city": …, "zip": …}. It is the reverse of the JSON to CSV flattening.
Delimiters and quoted fields
Parsing uses Papa Parse, which follows RFC 4180: a field wrapped in double quotes can contain the delimiter, line breaks and doubled quotes ("Said ""hi"""). Detect tries comma, semicolon, tab and pipe and picks the one that splits the rows most consistently. Semicolons are common in files exported from European versions of Excel, where the comma is the decimal separator.
Rows with a different number of fields than the header are still converted, and a warning lists the first few, since they usually mean an unquoted delimiter inside a value.
Type detection
CSV has no types: every value is text. With Detect numbers and true/false ticked:
42,-3.5and1e6become numbers.true/false(any case) become booleans, andnullbecomesnull.- Values with a leading zero (
01234,007) stay text, and so does every value in that column, so a zip or phone column never mixes"01234"and10001. - Integers too large for JavaScript to hold exactly (over 16 digits) stay text, so IDs aren't rounded.
Untick the option to keep every value as a string. Empty cells can become "", null, or be left out of the object.
Converting Excel files
The converter reads text, not .xlsx files. In Excel, use File > Save As > CSV UTF-8 (Comma delimited); in Google Sheets, File > Download > Comma-separated values. Then open the file here. Choosing the UTF-8 variant keeps accented characters intact. Each sheet has to be saved separately. Formulas are exported as their calculated values, and dates as they are displayed, so set the date column format to yyyy-mm-dd first if you want ISO dates in the JSON.
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
