CSV ↔ JSON converter
Convert tables and JSON records.
Enable JavaScript to use this interactive tool. Paste input, choose options, then copy or download the result, or save it to your notebook.
Example and common questions
Turn a spreadsheet export into API-style records without losing leading-zero IDs. CSV cells stay strings, including numbers and true/false text. Quoted commas belong inside a cell rather than starting a new column.
How to convert spreadsheet rows to JSON
- Paste the CSV and choose CSV → JSON; choose JSON → CSV when exporting records instead.
- Set the delimiter and whether the first row contains headers, then choose Convert.
- Review quoted fields and empty cells before copying, downloading, or saving the result.
Keep a leading-zero ID and a quoted company name
- Direction
- csv to json
- Delimiter
- comma
- Header row
- yes
- Empty or missing cells
- empty string
- Nested JSON values
- reject
id,company,active
0012,"Maya, Inc.",true[
{
"id": "0012",
"company": "Maya, Inc.",
"active": "true"
}
]Why are numbers and booleans strings?
CSV cells remain strings. The text true becomes "true", and a number stays text. Empty or missing cells follow the selected empty-string or null setting.
How do headers and delimiters work?
Choose the delimiter and whether the first row contains headers explicitly. With headers, rows become objects; without headers, rows become arrays of cells.
Can nested JSON become CSV?
Yes, with Nested JSON values set to json. Nested objects and arrays are then serialized into a cell. The reject setting reports an error instead.
Common errors and limitations
Look for duplicate headers, extra cells, unterminated quotes or characters after a closing quote. When converting JSON, use an array and choose JSON-in-cell handling if its values are nested.