CSV to JSON Converter
Turn CSV rows into clean JSON in one step, with typed values, custom delimiters and pretty or minified output.
Processed locally in your browser· Your data stays in your browser.
What is CSV to JSON Converter?
JSON is the format most APIs and JavaScript code expect, while data often arrives as CSV exports. This converter reads the CSV with a proper parser (quotes, embedded line breaks, BOM, CRLF) and produces either an array of objects, using the first row as keys, or an array of arrays.
With value detection enabled, numbers, true/false and null become real JSON types, while values with leading zeros such as "007" or numbers longer than 15 digits stay strings so identifiers are never corrupted. Duplicate or empty headers are renamed, and keys such as __proto__ are handled safely.
How does it work?
- Paste your CSV or open a .csv file; the delimiter is detected automatically unless you choose one.
- Keep "First row is a header" for an array of objects, or untick it to get an array of arrays.
- Decide whether numbers, booleans and null should be detected, and whether empty cells become null.
- Pick pretty (2 or 4 spaces, tabs) or minified output, then copy or download data.json. Use Swap to convert JSON back to CSV.
Common use cases
- Feeding a spreadsheet export into a REST API, a mock server or a front-end prototype.
- Creating fixtures and seed data for tests from a shared spreadsheet.
- Converting configuration tables or translation sheets into JSON files.
- Preparing data for a chart library that expects an array of objects.
Examples
Try this input in the tool above:
id,name,active,score,city 1,Alice,true,12.5,Paris 2,Bob,false,8,"Lyon, France" 3,Chloé,true,,Nice
[
{
"id": 1,
"name": "Alice",
"active": true,
"score": 12.5,
"city": "Paris"
},
{
"id": 2,
"name": "Bob",
"active": false,
"score": 8,
"city": "Lyon, France"
},
{
"id": 3,
"name": "Chloé",
"active": true,
"score": "",
"city": "Nice"
}
]Privacy
CSV to JSON Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
Conversion happens in memory in your browser, so extremely large files (hundreds of MB) may be slow. Dates are not converted: they stay as text.
Frequently asked questions
Why are some numbers kept as strings?
Values with leading zeros (zip codes, phone numbers) and numbers over 15 digits cannot be represented safely as JSON numbers, so they stay text to avoid losing information.
What happens with duplicate or empty column names?
Empty names become column_N and duplicates get a suffix such as name_2, so every object key is unique and no data is overwritten.
Can I get an array of arrays instead of objects?
Yes. Untick "First row is a header" and every row, including the first one, is output as an array of values.
Related tools
JSON to CSV Converter
Paste a JSON array and get a CSV file ready for Excel or Google Sheets, with nested data flattened into columns.
JSON & Data
CSV Viewer
Paste CSV text or open a .csv file and inspect it as a table, with row and column counts and the detected delimiter.
JSON & Data
CSV Validator
Check that a CSV is well-formed before importing it, and get a list of problems with line numbers.
JSON & Data
JSON Formatter & Beautifier
Turn a minified or messy JSON document into readable, consistently indented text, with a precise error message if the JSON is invalid.
JSON & Data
Excel to CSV Converter
Drop a spreadsheet, choose a sheet and get a clean CSV, with the delimiter and quoting you need.
JSON & Data
Excel to JSON Converter
Drop a workbook and get the chosen sheet as a JSON array of objects, with dates as ISO text.
JSON & Data
YAML to JSON Converter
Turn YAML into strict JSON, resolving anchors, aliases and merge keys along the way.
JSON & Data
CSV Delimiter Converter
Convert CSV between comma, semicolon, tab, pipe and custom delimiters without breaking quoted fields.
JSON & Data