CSV to JSON conversion
How the CSV to JSON conversion works
CSV (comma-separated values) is the universal export format of spreadsheets, CRMs, shops and databases. JSON is what web APIs, JavaScript apps and NoSQL databases expect. This CSV to JSON converter bridges the two while following RFC 4180, the CSV standard, so quoted fields that contain commas, quotes or line breaks are read correctly.
Given this CSV:
name,email,plan,active
Ana,ana@example.com,pro,true
"Lee, Sam",sam@example.com,free,false
the default output is an array of objects, one per row, with the header row as keys:
[
{"name": "Ana", "email": "ana@example.com", "plan": "pro", "active": true},
{"name": "Lee, Sam", "email": "sam@example.com", "plan": "free", "active": false}
]
Delimiter and type detection
The delimiter is detected from the first line: comma, semicolon (common in European Excel exports), tab (TSV) or pipe. With Detect numbers, booleans and null on, 30 becomes a number and true a boolean. Long numeric IDs, phone numbers and values with leading zeros like 00123 stay as strings so nothing is lost or rounded.
Output shapes
Choose the right JSON structure
| Output | Looks like | Best for |
| Array of objects | [{"id":1,"name":"Ana"}] | REST APIs, JavaScript, MongoDB imports |
| Array of arrays | [["id","name"],[1,"Ana"]] | Charts, compact transfer, Google Sheets API |
| Object keyed by a column | {"1":{"name":"Ana"}} | Fast lookups by ID or SKU, config maps |
| NDJSON / JSON Lines | one object per line | BigQuery, Elasticsearch bulk, log pipelines, streaming |
| Object of columns | {"id":[1,2],"name":["Ana","Lee"]} | Data science tools, pandas, chart libraries |
Tick Nest dot headers to turn columns like user.name and user.email into a nested "user": {"name": ..., "email": ...} object. Other clean-up options trim spaces, skip empty rows and turn empty cells into null.
Advertisement
JSON to CSV
Convert JSON to CSV for Excel and Sheets
The JSON to CSV tab does the reverse. Paste an array of objects, an API response that wraps the array (like {"data": [...]}), or NDJSON with one object per line. Nested objects are flattened into dot-notation columns, and the header is the union of every key found, so rows with missing fields still line up.
Choose semicolon as the CSV delimiter if Excel in your region puts everything in one column, or tab for a TSV that pastes cleanly into any spreadsheet. If your JSON is invalid, run it through the JSON formatter first to see the exact line and column of the error. The JSON formatter also has its own JSON to CSV and YAML export.
Tips
Tips for clean CSV to JSON exports
- Excel exports: save as "CSV UTF-8" so accented characters survive. A UTF-8 byte order mark is removed automatically.
- Duplicate or blank headers are renamed (
email_2, column_3) so no data is overwritten.
- Ragged rows with too few or too many fields are reported, and missing cells are filled with empty values.
- Large files: up to 3 MB or 50,000 rows per conversion. Split bigger files and convert them in parts.
- Cleaning a list before converting? Remove repeated rows with Remove Duplicate Lines.
Example
A complete CSV to JSON example
Here is a small CSV with a nested header, a number, a boolean and an empty cell:
id,user.name,user.city,score,active,notes
101,Ana,Galle,92.5,true,
102,Ravi,Kandy,88,false,needs review
With Nest dot headers, type detection and Empty cells as null turned on, the output is:
[
{"id": 101, "user": {"name": "Ana", "city": "Galle"}, "score": 92.5, "active": true, "notes": null},
{"id": 102, "user": {"name": "Ravi", "city": "Kandy"}, "score": 88, "active": false, "notes": "needs review"}
]
Switch the shape to Object keyed by a column with id as the key and you get {"101": {...}, "102": {...}}, which is ideal for quick lookups in JavaScript. Choose NDJSON and each object is written on its own line, ready for bq load or an Elasticsearch bulk import.
FAQ
CSV to JSON Converter: frequently asked questions
How do I convert CSV to JSON?
Paste your CSV or upload the file, keep First row is header ticked, choose an output shape such as Array of objects, and click Convert. Copy the JSON or download data.json.
Does the converter handle commas inside values?
Yes. Values in double quotes can contain commas, quotes and line breaks, as defined by the CSV standard RFC 4180.
Can I convert a semicolon or tab separated file?
Yes. The delimiter is auto-detected, or you can choose comma, semicolon, tab or pipe yourself.
How are numbers and true/false handled?
With type detection on, numbers become JSON numbers and true, false and null become JSON literals. Long IDs and values with leading zeros stay as strings so they are not changed.
What is NDJSON?
NDJSON (newline-delimited JSON, also called JSON Lines) has one complete JSON object per line. It is used by BigQuery, Elasticsearch and log tools because files can be streamed line by line.
How do I convert JSON to CSV?
Open the JSON to CSV tab, paste an array of objects or NDJSON, choose a delimiter and click Convert. Nested objects become dot-notation columns.
How big can the CSV file be?
Up to 3 MB or 50,000 rows per conversion.
Is my data uploaded and stored?
The data is sent to our server only to convert it, processed in memory, and discarded. Nothing is saved or logged.