CSV to JSON Converter
Convert CSV to JSON with auto-detected delimiter, header row, number and boolean typing and dot-path columns turned into nested objects. Free and private.
Runs entirely in your browser. Your data is never uploaded.
Related Tools
View AllWhat is CSV to JSON?
Convert CSV or TSV data into a JSON array. With a header row each line becomes an object, quoted fields with commas and line breaks are parsed correctly, and columns like address.city can be turned into nested objects.
How to use CSV to JSON
- Paste CSV into the CSV input box, or use Load sample or Open file.
- Choose the Delimiter (auto-detect, comma, semicolon, tab or pipe) and whether the First row is a header.
- Toggle Convert numbers, booleans and empty cells and Nest dotted headers.
- The JSON output updates as you type; use Copy or Download.
Example
id,name,address.city 1,Ada,London
[
{
"id": 1,
"name": "Ada",
"address": {
"city": "London"
}
}
] When to use CSV to JSON
Use it to turn spreadsheet exports into JSON for APIs, fixtures or scripts. Turn typing off when leading zeros matter (postal codes, phone numbers), because "007" would otherwise become 7.
How CSV to JSON works
Parsing is done with PapaParse, which follows RFC 4180 quoting: fields in double quotes may contain delimiters, line breaks and doubled quotes (""). Empty lines are skipped and a UTF-8 BOM is removed. With typing enabled, numeric and true/false cells become numbers and booleans and empty cells become null. Dotted headers are then expanded into nested objects (address.city → {"address":{"city":…}}), and numeric path segments create arrays.
Common Use Cases
- Convert a spreadsheet export into JSON for a REST API import
- Create JSON test data from a CSV file
- Turn semicolon-separated European CSV into JSON
- Build nested JSON objects from flat column names
FAQs
How is the delimiter detected?
PapaParse tries the common delimiters on the first lines and picks the one that splits rows most consistently. Choose it manually if detection fails.
Can fields contain commas or line breaks?
Yes, if they are wrapped in double quotes as RFC 4180 requires.
What if I have no header row?
Untick First row is a header; every row then becomes an array of cell values.