CSV to JSON Converter
Turn a CSV export from Excel, Google Sheets or a database into a JSON array ready for code or an API.
Convert CSV to JSON Online
CSV is how spreadsheets and databases export data, and JSON is how programs and APIs want it. Converting by hand, or with a quick split on commas, breaks as soon as a field contains a comma, a quote or a line break. This page is the JSON Converter with CSV in and JSON out, using a full RFC 4180 parser.
Everything runs in the browser tab, so the file is never uploaded.
What the parser handles
- Quoted fields with commas, semicolons and line breaks inside them.
- Doubled quotes:
"say ""hi"""becomessay "hi". - Excel byte-order marks, which would otherwise end up in the first column name.
- Empty header cells, which are named column1, column2 and so on.
- An unclosed quote, which is reported instead of silently swallowing the rest of the file.
Types in the output
| CSV value | JSON with type detection | JSON without |
|---|---|---|
42 | 42 | "42" |
true | true | "true" |
007 | "007" | "007" |
1.50 | "1.50" | "1.50" |
| empty | "" | "" |
Rebuilding nested objects
A flat table can still describe nested data if the column names say where each value belongs. With Nest dotted column names ticked, a column called address.city becomes {"address": {"city": ...} }, which is exactly the reverse of JSON to CSV.
Next steps
To check the result or reformat it, open it in the JSON formatter. To turn the same data into YAML, choose YAML as the output format on the JSON Converter.