Drag & drop a CSV file here, or
Supports .csv and .txt files
How This Tool Converts CSV to JSON
- The first row of your CSV is treated as the header row. Its column names become the keys for every JSON object in the output array.
- Each subsequent data row becomes one JSON object. Column order is preserved and each value is mapped to the header key of its column.
- Fields wrapped in double quotes are parsed correctly, including values that contain commas, line breaks, or escaped double quotes (
"") inside them. - Empty cells are preserved as empty strings (
"") in the JSON output. All CSV values are output as strings — type casting (numbers, booleans) must be applied in your target application.
When to Use CSV to JSON
- When you have a spreadsheet export (Excel, Google Sheets) and need to load the data into a JavaScript application, REST API, or NoSQL database.
- When a data pipeline produces CSV output and a downstream step expects JSON as input.
- When importing bulk records (users, products, transactions) into an application that reads a JSON array.
- When you want to inspect CSV data using JSONPath or
jqwithout writing a custom parser.
Frequently Asked Questions
How does the CSV to JSON converter work?
The first row of your CSV is treated as the header row and becomes the JSON object keys. Each subsequent row becomes a JSON object in the output array.
Is my CSV data sent to a server?
No. All conversion happens entirely in your browser using JavaScript. Your data never leaves your device.
Does it handle commas inside CSV fields?
Yes. Fields wrapped in double quotes are handled correctly, including commas and escaped double quotes ("") inside quoted fields.
Can I upload a CSV file instead of pasting?
Yes. Click "Choose File" or drag and drop a .csv or .txt file onto the drop zone. The file contents are loaded into the editor automatically.
Does my CSV need a header row?
Yes. The first row must be the header row — its values become the JSON object keys. If your CSV has no header row, the first data row will be treated as keys, which will produce incorrect output. Add a header row before converting.
Are numbers and booleans detected automatically?
No. All CSV values are output as strings — a cell containing 42 becomes "42", not the number 42. CSV has no type system, so type casting must be applied in your target application after importing the JSON.