How to use the CSV to JSON Converter
Paste CSV, upload a .csv file, or click Sample.
Choose the delimiter: comma, semicolon, tab, pipe or a custom character.
Set whether the first row contains headers, and whether to convert numbers and booleans.
Click Convert, then copy or download the JSON.
Examples
name,age,member Ada,36,true Alan,41,false
[
{ "name": "Ada", "age": 36, "member": true },
{ "name": "Alan", "age": 41, "member": false }
]How the conversion works
With First row is headers on, each subsequent row becomes a JSON object whose keys are the header names. Empty header cells become Column_1, Column_2 and so on, and duplicate headers get a suffix (id, id_2) so no data is lost. Rows with extra cells get extra columns.
With headers off, the result is an array of arrays, one per row, which is useful for data without a header or for matrix-style data.
Parsing follows the CSV standard (RFC 4180): fields wrapped in double quotes may contain commas, line breaks and escaped quotes ("").
Type detection
CSV has no types; everything is text. With Detect numbers and booleans off, every value stays a string, which is the safest choice for IDs, phone numbers and postcodes with leading zeros. With it on, values such as 36 and 3.5 become numbers and true/false become booleans, which is usually what you want for analytics and APIs. Check columns like ZIP codes after converting, as 01234 would become 1234.
Delimiters and spreadsheet exports
Not every "CSV" uses commas. Excel in many European locales exports with semicolons because the comma is the decimal separator. Database tools often export tab-separated files (TSV), and some systems use pipes |. Choose the matching delimiter, or enter any custom character.
To export from Excel or Google Sheets, use File → Download or Save As → CSV (UTF-8). Using the UTF-8 option keeps accented letters and symbols intact.
After converting
Validate or re-indent the result with the JSON Formatter. If you only need one column as a list, paste that column into the List Sorter to sort and deduplicate it. Because conversion happens in your browser, customer lists and financial exports are never uploaded.
Common CSV problems and fixes
- Everything ends up in one column: the delimiter is wrong. Exports from European versions of Excel usually use semicolons.
- Strange characters such as "é": the file was saved in a legacy encoding. Re-export as CSV UTF-8.
- Rows split in the middle: a field contains a line break but is not wrapped in double quotes. Fix the source or quote the field.
- Leading zeros disappear: turn off number detection so values like
007stay as text. - An extra empty object at the end: the file ends with blank lines. Empty lines are skipped automatically.
JSON output format
The result is a pretty-printed JSON array with two-space indentation, one object per row, keys in the same order as the CSV columns. It is ready to paste into JavaScript, a REST client or a test fixture. To produce a compact single-line version, paste the output into the JSON Formatter and click Minify.
Frequently asked questions
Last reviewed by the WordTools Pro team. How our tools work