Convert CSV to JSON
A CSV file or pasted CSV to a JSON list of objects, with typed values or all text.
Free, no sign-up, no credit card. Your files stay on your device.
How to convert CSV to JSON
- Choose a CSV or TSV file, or paste CSV into the box.
- Say whether the first row holds the column names, and whether values keep their types.
- Check the result, then select Download or Copy.
What to know
Reading the CSV
- Cells in quotes may hold the separator, doubled quotes, and line breaks.
- Files in UTF-8 or UTF-16 with a byte order mark, and Windows-1252 are read; the encoding is found from the bytes.
- Blank lines are left out. A row with fewer cells than the header gets null, or an empty string, for the rest.
Choosing the output
- Indented JSON is easy to read. Compact JSON is the smallest and is what programs want.
- Long output is shown shortened in the box, but Copy and Download give all of it.
If something goes wrong
Everything is in one key
The separator was guessed wrongly. Choose the separator the file really uses under Columns are separated by, such as semicolon or tab.
A number I need to keep as text became a number
Plain numbers without leading zeros and with up to 15 digits are converted, so a value such as 1.10 becomes 1.1. If the exact text matters, choose "Keep everything as text", and convert the columns you need in your own code.
The first row of data became the keys
Under First row, choose Is data. You get a list of lists with no keys.
I want a spreadsheet, not JSON
To turn a CSV into an Excel file, use CSV to Excel. Use CSV to Excel.
Questions
Is my CSV uploaded?
No. Your files are processed on your device. We never upload them. The text you paste is converted on your device too.
What does the JSON look like?
A list with one object for each row, with the column names as keys. If the first row is data and not names, you get a list of lists instead.
Which values become numbers?
Plain numbers such as 42, -3.5 and 0.25. IDs with leading zeros, numbers of more than 15 digits, numbers with a plus sign, an exponent, or a thousands separator, dates, and all other text stay text. Choose "Keep everything as text" to turn nothing into another type.
What happens to empty cells and true and false?
With values detected, an empty cell becomes null, and true and false (also TRUE, FALSE, True and False) become JSON true and false. With everything kept as text, an empty cell is an empty string and true is the word.
Can it make nested JSON?
Yes, when you choose "Rebuild nested objects". A column named address.city goes into an address object, and columns named tags.0 and tags.1 make a list. A dotted name that would clash with a plain column, such as address next to address.city, stays as it is.
How does it find the separator?
It tries comma, semicolon, tab, and pipe on the first rows and keeps the one that gives every row the same number of columns. Choose it yourself if the guess is wrong.
What if two columns have the same name?
The second is renamed, for example name (2), and an empty column name becomes column 3 and so on, so that no value is lost.