JSON appears here.How to use
Add your CSV
Paste CSV or TSV, drop or upload a .csv, .tsv, .xlsx, .xls or .ods file, or press Load URL. For a workbook with several sheets, pick one in the Sheet menu. Try sample loads a small table.
Set options and convert
Check the delimiter and whether the first row is the header, then pick the Output shape, Indent, Empty cells and Nested keys settings. Press Convert to JSON; changing an option updates the result.
Copy or download the JSON
Press Copy, or Download to save .json (.jsonl for JSON Lines). Warnings about rows with too few or too many fields appear below the panes, and Show the parsed table displays the rows as read.
Why CSV to JSON Converter
- Keeps leading zeros in zip codes and IDs as text while still typing real numbers and booleans.
- Four output shapes, nested objects from dotted headers, and JSON Lines or minified output.
- Reads .xlsx, .xls and .ods sheets directly, as well as CSV, TSV and pasted cells.
- Parsing runs in your browser and handles quoted fields with commas and line breaks.
Example: CSV input and JSON output
The sample CSV has a header row, id,name,zip,active,score,address.city,address.country, and three rows. One name contains a comma, so it is quoted as "Smith, Bob". Two zip codes start with 0, and the last row has an empty score.
The table shows how each kind of cell comes out, first with Detect numbers and booleans ticked (the default) and then with it unticked. Every row becomes one object in a JSON array, with the header cells as keys.
Set Nested keys to split on a dot and the two address columns become one address object with city and country inside it.
| CSV cell | Column | Detection on | Detection off |
|---|---|---|---|
| 1 | id | 1 | "1" |
| Alice | name | "Alice" | "Alice" |
| "Smith, Bob" | name | "Smith, Bob" | "Smith, Bob" |
| 02134 | zip | "02134" (leading zero kept) | "02134" |
| true | active | true | "true" |
| 9.5 | score | 9.5 | "9.5" |
| (empty) | score | "" by default, or null or no key | "" |
Exporting CSV from Excel and Google Sheets
Spreadsheet apps can all save CSV, but the menu names and defaults differ. A clean export avoids most conversion problems, especially with accents and delimiters.
- Excel: File, Save As, then choose CSV UTF-8 (Comma delimited). The UTF-8 version keeps accented characters intact. Excel saves only the active sheet.
- Google Sheets: File, Download, Comma-separated values. Only the sheet you are viewing is exported.
- Apple Numbers: File, Export To, CSV, then choose Unicode (UTF-8) text encoding.
- If your Excel uses a comma as the decimal separator, it may save with semicolons. Leave Delimiter on Auto-detect or choose Semicolon.
- For a quick job, select the cells, copy, and paste them here. Copied cells arrive tab-separated, which the converter reads as TSV. You can also upload the .xlsx file itself.
- Check the first line of the exported file. If it is not the header row, untick First row is the header or use Skip lines at top to jump past title rows.