What is CSV to JSON?
CSV to JSON converts comma-separated values data into structured JSON, automatically detecting delimiters, inferring data types, and supporting multiple output formats. It’s the bridge between spreadsheet exports and API/code consumption.
Your data is processed entirely in the browser — no CSV content is uploaded to any server at any point.
Output Modes
Array of Objects
Each row becomes an object with header keys. The most common JSON structure for APIs and databases.
Array of Arrays
Each row becomes an array. More compact — useful when column order is fixed and key names aren't needed.
Keyed Object
One column becomes the key for a parent object. Useful for lookup tables where a unique ID maps to row data.
How to Use CSV to JSON
Paste CSV
Paste raw CSV text or upload a .csv file. Headers are read from the first row by default.
Set delimiter
Auto-detection handles most cases. Override manually if the detected delimiter is wrong.
Choose output
Select array of objects, array of arrays, or keyed object mode.
Toggle type inference
On by default — converts numeric strings to numbers and 'true'/'false' to booleans.
Copy JSON
Click Copy to grab the formatted JSON output.
Example Conversion
Input CSV:
name,age,active
Alice,28,true
Bob,34,false
Output JSON (array of objects):
[
{ "name": "Alice", "age": 28, "active": true },
{ "name": "Bob", "age": 34, "active": false }
]
With type inference on: 28 is a number, true is a boolean — not strings.
Tips & Common Mistakes
Fields with commas need quotes. If a CSV field contains a comma (e.g. “Smith, John”), it must be wrapped in double quotes in the CSV: "Smith, John". The parser handles this correctly.
Watch for BOM characters. CSV files from Excel sometimes start with a byte-order mark (BOM). If the first key in your JSON looks like name, enable ‘Strip BOM’ in the options.
Related Tools
- JSON to CSV — reverse conversion
- JSON Formatter — beautify and validate JSON output
- JSON Validator — check output structure