In this article
Two formats, two strengths
| CSV | JSON | |
|---|---|---|
| Shape | Flat table: rows and columns | Nested objects and lists |
| Opens in | Excel, Google Sheets, Numbers | Code editors, apps, APIs |
| Data types | Everything is text | Text, numbers, true/false, null |
| Best for | Lists people edit and analyse | Data that programs exchange |
CSV to JSON: getting spreadsheet data into an app
- In Excel choose File → Save As → “CSV UTF-8”; in Google Sheets, File → Download → CSV.
- Open the file or paste its contents into the CSV ⇄ JSON Converter.
- Keep “First row is the header” on – column names become keys.
- Decide whether to convert numbers and true/false into real JSON types.
- Copy or download the JSON array.
The converter follows the CSV standard: quoted fields can contain commas, quotes and line breaks, and the delimiter (comma, semicolon, tab or pipe) is detected automatically.
JSON to CSV: getting API data into a spreadsheet
Switch the direction and paste a JSON array of objects. Every key becomes a column. Nested objects are flattened into dotted names – {"address": {"city": "Lahore"}} becomes a column called address.city – and any value containing commas or quotes is quoted correctly so it opens cleanly in Excel.
Traps that damage data
| Trap | What happens | Prevention |
|---|---|---|
| Leading zeros | Postcode 01234 becomes 1234 | Turn off number conversion for codes and phone numbers |
| Long numbers | Excel shows card or ID numbers as 1.23E+15 | Format the column as Text before pasting |
| Accents and Urdu | Show as garbled characters | Export “CSV UTF-8”, not plain CSV |
| Semicolon CSVs | Everything lands in one column | Let the converter detect the delimiter |
| Dates | Excel changes 03-04 into a date or flips day/month | Use ISO dates: 2026-04-03 |
Large files
A CSV with tens of thousands of rows converts fine in a modern browser, but very large exports (hundreds of megabytes) are better handled with command-line tools or a database import. If a spreadsheet export is huge, check whether you need every column – deleting unused columns before export makes everything faster.
Check the result
Paste the JSON into the JSON Validator to confirm it is valid, and skim a few records in the JSON Formatter. For CSV, open it in your spreadsheet and check that columns line up and special characters look right.
Choosing column names
Column headers become JSON keys, so short, consistent names save trouble later. Prefer first_name or firstName over “First Name (as on ID)”, avoid duplicates, and do not leave a header cell empty. If several systems will use the data, agree on one naming style and convert headers with the Case Converter.
Cleaning before converting
Remove duplicate rows with Remove Duplicate Lines and stray spaces with Remove Extra Spaces – clean data in, clean data out.
Conversion runs entirely in your browser, so customer lists and exports never leave your computer.