CSV to JSON converter
The result appears here.
Convert
Your document never leaves the browser.
CSV to JSON with the delimiter and header detected — comma, semicolon, tab or pipe.
Paste or drop a CSV export from any spreadsheet and get an array of objects, with the page saying how it read the file and a choice when the guess is wrong.
The CSV, separated by semicolons
id;name;city
1;Ada;London
2;Linus;Helsinki
3;Grace;New YorkThe JSON it gives, at the default settings
[
{
"id": 1,
"name": "Ada",
"city": "London"
},
{
"id": 2,
"name": "Linus",
"city": "Helsinki"
},
{
"id": 3,
"name": "Grace",
"city": "New York"
}
]Reading
The delimiter is found by trying comma, semicolon, tab and pipe on the first 50 records, and keeping the one that gives every row the same number of columns. A sep= first line, as Excel writes it, decides instead.
Reading
A header row is assumed, unless every non-empty cell in the first row is a number or true/false. With no header the result is an array of arrays; no key names are invented.
Reading
Quoted fields may hold the delimiter, doubled quotes and line breaks, as RFC 4180 says. Cells are never trimmed.
Reading
A byte-order mark is stripped, and blank lines between records are skipped and counted.
A cell that is exactly a JSON number becomes that number, with its digits copied as written; 007 stays a string, and so does a decimal comma like 1.249,50. true and false become booleans. An empty cell is null, and a quoted empty cell is "". A cell holding a JSON object or array becomes that object or array again. Dotted headers such as address.city stay flat keys.
A row with a leading zero, a decimal comma, a boolean and two empty cells
code,price,paid,note,extra
007,"1.249,50",true,,""The JSON it gives, at the default settings
[
{
"code": "007",
"price": "1.249,50",
"paid": true,
"note": null,
"extra": ""
}
]A blank header is named column1, column2 and so on, and a repeated one gets _2, _3. A first column headed # whose values count up from 0 — the row numbers our own export writes — is dropped. Each fix is counted in the result. A row shorter than the header is padded with null and counted; a longer one, or a quoted field that never closes, is refused with its line and column. The options column lets you set the delimiter and header yourself, and Auto names what it guessed.
A row longer than the header
id,name
1,Ada
2,Linus,Helsinki✕ Line 3, column 9: Row 3 has 3 fields; the header has 2
The conversion runs in your browser, in the same engine the editor uses. The document is never uploaded, never logged and never leaves your machine — there is no server to send it to. Once the page has loaded it keeps working with the connection off.
Going the other way?
No. Excel saves CSV with semicolons wherever the comma is the decimal mark, and the page detects it. If it guesses wrong, choose the delimiter under Options.
Choose TSV under From, or paste tab-separated text and it is detected. A tab is then always the delimiter.
No. Only text that is exactly a JSON number becomes a number, and 0150 is not one.