CSV to JSON converter: turn a CSV table into JSON

Convert CSV to JSON: the delimiter is detected for you, the first row becomes keys, numbers and true/false are optional, and leading zeros like "007" are kept.

Need the other way? JSON → CSV

How to use

Paste a table into the box — from a CSV file, Excel or Google Sheets — or open a file. JSON appears below, ready to copy or download. The delimiter is detected for you: comma, semicolon, tab (what you get when copying from Excel) or pipe. If it guesses wrong, choose one yourself.

Files saved by Excel in a Windows encoding open too: a file that isn’t UTF-8 is read as Windows-1252. Everything runs in your browser; nothing is uploaded.

Options

Example

id,name,city
1,Ann,Lisbon
2,Bob,Porto

becomes

[
  { "id": 1, "name": "Ann", "city": "Lisbon" },
  { "id": 2, "name": "Bob", "city": "Porto" }
]

FAQ

Why didn’t “1,5” become a number? JSON uses a dot for decimals. A comma in a number is how European versions of Excel write it, and silently swapping it for a dot would be guesswork. If you need numbers, save the table with dots as decimal separators.

What does “a different number of fields” mean? Those lines have more or fewer cells than the first one — usually a stray delimiter or a value with a comma that isn’t quoted. The lines are still converted, but they’re worth checking.

What does “a quote is never closed” mean? A value starts with a quote but there’s no closing quote before the end of the file. Look at the line given in the message.

How do I get JSON on one line? Choose the “Minified” format.