How to convert CSV to JSON
Turn a CSV table into an array of JSON objects, using the first row for property names. This makes a spreadsheet export suitable for a JavaScript project, configuration import or data pipeline without uploading the table.
- Paste the CSV or open its local text file.
- Keep the input delimiter on automatic detection for a conventional export, or choose the actual separator if fields do not align.
- Make sure the first row contains distinct field names and run the conversion.
- Preview the JSON before copying or downloading it.
Example input
SKU,Item,Quantity 00104,"Pocket, notebook",2 00105,Pencil,3
Example use
A product table starts with SKU,Item,Quantity and has a row for 00104,Notebook,2. The result contains one object with SKU “00104”, Item “Notebook” and Quantity “2”. Choose strings when an identifier must retain its leading zeros. Convert quantities explicitly in your receiving application if it expects numeric values.
Output and compatibility
The converter represents CSV cells as strings. This keeps codes such as 00104 and avoids guessing dates and booleans. A comma within a value belongs inside a quoted field; embedded newlines also need CSV quoting. JSON provides a record structure rather than spreadsheet styling, formulas or multiple worksheets.
Troubleshooting
If all values end up together, choose the right input delimiter. If columns shift, check quotation and field counts in Validate CSV. Inspect duplicate or empty headers before using the records in another system.
Check the data grid in CSV Viewer first if you are unsure which row should become the headers.
Frequently asked questions
How do I keep leading zeros in a CSV column?
The resulting JSON values are strings. Keep that property as a string when you import it.
Does the first row become its own data record?
It supplies property names, and subsequent rows are converted to objects.
Can it infer numbers and dates?
The CSV parser retains cells as text. Add typing in your own import or application code where the schema is known.
Can I start from an Excel workbook?
Use Excel to JSON to read a worksheet directly.
Will my data leave my browser?
Conversion runs on your device and does not require an account.
How do I turn the result back into a table?
Use JSON to CSV, then verify the headers and any quoted fields.