Skip to content
MyToolers

CSV to JSON Converter (and JSON to CSV)

Convert CSV to JSON and JSON back to CSV, with automatic delimiter and type detection.

Rows
3
Columns
5

About this tool

Convert spreadsheet data to JSON for an app or API, or turn JSON back into CSV you can open in Excel or Google Sheets. The converter handles quoted fields with commas and line breaks, detects comma, semicolon, tab or pipe delimiters, uses the first row as keys, and can turn numbers, true/false and empty cells into proper JSON values — while keeping phone numbers with a leading zero as text.

How to use it

  1. Choose CSV → JSON or JSON → CSV.
  2. Paste your data — rows copied from Excel or Google Sheets paste as tab-separated text, which is detected automatically.
  3. Adjust the options if needed, then copy the result.

Good to know

  • Follows the CSV standard (RFC 4180): fields in double quotes can contain the delimiter, line breaks and doubled quotes.
  • With “First row is headers”, each row becomes an object; repeated or empty headers get unique names (id, id_2, column3).
  • Type detection turns 42 into a number, true into a boolean and empty cells into null, but keeps 03001234567 as text so leading zeros aren't lost.
  • JSON → CSV collects every key from every object as a column, and quotes values that contain commas, quotes or line breaks.
  • Everything is converted in your browser; nothing is uploaded.

Worked example

A customer list with name, phone, city, orders and vip columns becomes an array of objects such as {"name": "Ayesha Khan", "phone": "03001234567", "city": "Lahore", "orders": 12, "vip": true}. The quoted value "Malik, Bilal" stays in one field despite its comma, orders become numbers, and an empty vip cell becomes null.

Common problems and fixes

Columns shifted? A value contains the delimiter without quotes — export the file again with quoting turned on, or choose the right delimiter. Strange characters at the start? The file has a byte-order mark, which is removed automatically. Leading zeros missing? They were lost in Excel before export; format that column as text in the spreadsheet.

Frequently asked questions

How do I convert a CSV file to JSON?

Open the CSV, copy everything and paste it into the box. The delimiter is detected, the first row becomes the keys, and you can copy the JSON array straight away.

Why are my phone numbers kept as text?

Numbers with a leading zero, like 03001234567, would lose the zero as a JSON number. They are kept as strings so the data stays correct.

Can I convert JSON to an Excel file?

Convert it to CSV here, copy the result into a text file saved as .csv, and open it in Excel or Google Sheets.

What if my CSV uses semicolons?

Semicolon-separated files, common in Europe, are detected automatically — or choose the delimiter yourself.