CSV to JSON
Convert CSV to a JSON array online with header detection, type inference and delimiter auto-detection. Turn spreadsheet exports into data for APIs and code.
Runs in your browser · Nothing uploadedFree · No sign-up
Something not working, or missing a feature? Send feedback
About the CSV to JSON
The CSV to JSON converter reads CSV or TSV exports and produces a JSON array. It detects the delimiter, can use the first row as keys, and can turn numbers and booleans into real JSON types.
Conversion happens in your browser, so your files and records stay private.
How to use the CSV to JSON
- Paste CSV or open a .csv file.
- Check the delimiter, header row and type inference options.
- Copy or download the JSON.
Example
Input
id,name,score,active,notes 1,Ada,98.5,true,"Likes ""quotes"", and commas" 2,Grace,87,false,
Result
[
{
"id": 1,
"name": "Ada",
"score": 98.5,
"active": true,
"notes": "Likes \"quotes\", and commas"
},
{
"id": 2,
"name": "Grace",
"score": 87,
"active": false,
"notes": null
}
]The header row becomes the keys, numbers and booleans become real JSON types, and the quoted field keeps its comma and escaped quotes.
Common mistakes
- Mixed types in one column. Type inference works cell by cell, so a column with 42 in one row and N/A in another gives a number and a string. Switch inference off if the consumer expects one type per column.
- The wrong delimiter. Exports from European Excel often use semicolons. If every row comes out as one long key, choose the delimiter manually.
- Duplicate header names. Two columns with the same header map to the same JSON key, so one value is lost. Rename one of them before converting.
Works well with the CSV to JSON
- JSON to SQL Insert: turn the rows into SQL INSERT statements.
- JSON Viewer: explore the result as a tree.
- JSON to TypeScript: generate a TypeScript type for the rows.
Frequently asked questions
What if my CSV has no header row?
Switch off "First row is header" and each row becomes an array of values instead of an object.
Are quoted fields with commas supported?
Yes. Quoted fields, escaped quotes and line breaks inside quotes are handled.
Are ZIP codes and long IDs kept?
Yes. Values that would change as numbers stay strings: codes with leading zeros such as 00123, and integers too large for JavaScript such as 64-bit IDs. Empty cells become null.
Does it handle TSV?
Yes. Tab-separated data is detected automatically, or choose tab as the delimiter.
How large a file can I convert?
Files of several megabytes convert in a few seconds in a modern browser, and nothing is uploaded.
Guides and tutorials
- JSON & Data Formats
How to Convert Nested JSON to CSV (Flattening Explained)
Turn nested JSON into a clean CSV for Excel or Google Sheets: dotted column names, arrays, missing keys, quoting and leading zeros, with working Python code.
· 5 min read
- Programming Languages
How to Run R Code Online (No RStudio, No Install)
Run R code online in your browser without RStudio: print values, explore built-in datasets, fit a linear model, read stdin, and fix the most common R errors.
· 5 min read
Related tools
JSON to CSV
Convert JSON arrays to CSV online with automatic column detection, nested object flattening and custom delimiters. Open the result in Excel or Sheets.
JSON to XML
Convert JSON to well-formed XML online with a configurable root element and attribute support. Validate the input and download the XML file.
XML to JSON
Convert XML to JSON online, keeping attributes and turning repeated elements into arrays. Malformed XML is reported with its location.
JSON to YAML
Convert JSON to clean, human-readable YAML online. Turn API responses and package files into config for Kubernetes, Docker Compose or CI pipelines.
YAML to JSON
Convert YAML documents to formatted JSON online with syntax validation. Errors are reported by line, so broken indentation is quick to find and fix.
JSON to PHP Array
Convert JSON to a PHP array literal online, using short [] or long array() syntax. Paste API responses straight into PHP code, tests and config files.