CSV to JSON Converter
Convert CSV text into JSON: an array of objects when the first row is a header, or an array of arrays when it is not.
CSV to JSON
Paste CSV; the JSON appears at once.
Result
JSON
[
{
"name": "Ana",
"age": 31,
"city": "Paris, FR"
},
{
"name": "Ben",
"age": 27,
"city": "Rome"
}
]2
Items
3
Columns
Private: Everything runs in this page. Nothing you type is sent anywhere or saved.
On this page
CSV to JSON examples
| CSV (rows separated by a bar) | JSON (one line) |
|---|---|
| a,b | 1,2 | [{"a":1,"b":2}] |
| name,age | Ana,31 | Ben,27 | [{"name":"Ana","age":31},{"name":"Ben","age":27}] |
| x | "a,b" | [{"x":"a,b"}] |
| k,v | t,true | f,false | [{"k":"t","v":true},{"k":"f","v":false}] |
| q | "say ""hi""" | [{"q":"say \"hi\""}] |
Formula
each row becomes an object: { column name: value, ... }
How the csv to json works
- Step onePaste your CSV, one row per line.
- Step twoChoose the separator, and whether the first row holds the column names.
- Step threeCopy the JSON. Numbers and true / false are converted when the box is ticked.
What this tool does not do
- It treats the whole input as one table; it does not guess the separator for you.
- Column names that are whole numbers are listed first, as JSON objects order them.
- It does not read Excel files; export the sheet as CSV first.
Frequently asked questions
How are quotes handled?
A field in double quotes can hold the separator and line breaks, and a doubled quote inside it stands for one quote mark, as the CSV standard (RFC 4180) describes.
Which values become numbers?
Only values that read back exactly the same, such as 42 or 3.14. A value like 007 or 1.50 stays text so that nothing is lost.
What if a row has fewer or more cells than the header?
Missing cells become empty text. Extra cells get names like column_4.