Start with a rectangular CSV, including a header
Open the CSV to JSON converter and leave Convert set to CSV → JSON. Paste the CSV into Your CSV. For a usual spreadsheet export, leave Header row ticked so the first row becomes the object keys.
Each data row must have the same number of fields as the header. If a cell contains the delimiter, that cell must be wrapped in double quotes, with any quotes inside it doubled. A comma inside a correctly quoted cell does not start a new field.
Example input
Product,Code,In stock
Notebook,00123,true
"Pen, blue",00456,falseMatch the delimiter and convert
Choose the CSV delimiter that matches what you pasted: Comma (,), Semicolon (;) or Tab. Spreadsheet files from some locales use a semicolon. Copied cells from Excel or Google Sheets are usually tab-separated; if the preview looks like a single column, try Tab, or paste those cells into the table converter instead.
Press Convert. With Header row on and Detect numbers off, values stay as text, including leading zeros and the words true and false.
Example result
[
{
"Product": "Notebook",
"Code": "00123",
"In stock": "true"
},
{
"Product": "Pen, blue",
"Code": "00456",
"In stock": "false"
}
]Turn on Detect numbers only when you want types
Detect numbers converts a cell to a JSON number when it is a safe decimal or integer, and converts the exact values true, false and null into those JSON types. Identifiers that look like numbers with leading zeros, such as 00123, stay as text, because they do not match a canonical number.
Integers larger than what JavaScript can represent exactly are also left as text. If you need every value as a string, leave Detect numbers off.
Example result
[
{
"Product": "Notebook",
"Code": "00123",
"In stock": true
},
{
"Product": "Pen, blue",
"Code": "00456",
"In stock": false
}
]Turn off Header row for arrays of arrays
If there is no header, turn off Header row. Each row becomes a JSON array of values rather than an object, and the first row is included as data. Empty header cells, when Header row is on, are named column1, column2 and so on. Repeated header names get a suffix such as _2 so that every key is unique.
When to use a different tool
This conversion produces an array of objects, or of row arrays. If you need a Markdown table, or a JSON array that includes the header as an ordinary row of text cells, use the table converter. To go in the other direction, follow the JSON-to-CSV guide. The file is processed in your browser.