How to Convert CSV to JSON (and Back Again)
Updated October 2026
CSV is what spreadsheets export. JSON is what most websites, apps and APIs expect. Converting one to the other is a common chore, and it goes wrong in small ways: the wrong separator, numbers stored as text, a comma inside a name. This guide shows the quick way and the things to check.
Convert CSV to JSON in four steps
- Copy your data from the spreadsheet, or open the CSV file in a text editor and copy the text.
- Paste it into the CSV to JSON converter.
- Choose the separator that matches your data: comma, semicolon or tab.
- Check the result and copy the JSON.
Getting the data out of Excel or Google Sheets
The easiest way is to select the cells, copy them and paste them into the converter. Cells copied from a spreadsheet are separated by tabs, so choose Tab as the separator.
You can also save the sheet as a CSV file and open that file in a text editor. Many European programs use a semicolon between the values, because the comma is the decimal sign there. If everything ends up in one column, try the other separator.
What the JSON looks like
With the first row as column names, every other row becomes an object, and the whole file becomes a list of objects. This CSV:
- name,age,city
- Anna,31,Utrecht
- Ben,28,Leiden
becomes a list with two objects. The first has the keys name, age and city with the values Anna, 31 and Utrecht. Without a header row, you get a list of lists instead, one per row.
Numbers, true/false and empty cells
CSV has no types. Everything in it is text. The converter can turn values that look like numbers into real numbers, and the words true and false into real true and false. An empty cell becomes null.
- Turn the option on when the JSON goes into code that expects numbers.
- Turn it off when a value only looks like a number but is not one, such as a phone number, a postcode or an ID with leading zeros. As a number, 007 would lose its zeros.
Going back: JSON to CSV
Paste a list of objects and the converter builds a table. The column names are the keys. If some objects have keys that others do not, you still get one column for each key, with empty cells where a value is missing. A value that is itself a list or object is written as JSON text in the cell.
Common problems
- Everything is in one column: the separator is wrong. Try semicolon or tab.
- A name with a comma is split in two: in a real CSV, such a value is placed between quotes. The converter understands quotes and line breaks inside a quoted cell, but a file that is missing the quotes cannot be repaired.
- Strange characters: save the file as UTF-8 before copying the text.
- Error on JSON to CSV: the JSON must be valid, and a list of objects such as [{"name": "Anna"}] works best.
Privacy
The conversion runs in your browser. Your data is not uploaded or stored, so you can use it for customer lists or other private data.