How to Convert CSV to JSON (and JSON Back to CSV)
CSV ⇄ JSONSpreadsheets to JSON and back. Free, no sign-up.CSV is how spreadsheets and databases export data; JSON is what code and APIs expect. Converting between them is a common first step when importing data.
Convert CSV to JSON
- Open CSV ⇄ JSON and paste the CSV or open the file.
- Check the table preview. The delimiter (comma, semicolon, tab) is detected automatically.
- Copy the JSON or download it.
With the header row option on, each row becomes an object ({"name": "Ana", "city": "Lisbon"}). With it off, you get arrays. Numbers and true/false are detected so they are not left as strings.
The data stays in your browser. That matters for customer lists and exports that contain personal data.
Typical problems
- Commas inside values must be in quotes:
"Lisbon, Portugal". Exports from Excel already do this. - Semicolon CSVs come from Excel in many European locales. Detection handles them.
- Leading zeros in codes such as
00123look like numbers. If they matter, turn number detection off so they stay text.
Starting from Excel?
Save the sheet as CSV first with Excel to CSV (choose which sheet to export), then convert.
Going the other way
Paste a JSON array of objects to get a CSV back: the keys become the header row. Check deeply nested JSON first in the JSON Formatter; nested objects do not map neatly to columns.