CSV to JSON Converter is a free tool that converts CSV files and spreadsheet exports into JSON. It uses the header row for property names, turns numbers and true/false into real values, and correctly handles quoted fields with commas and line breaks. The separator (comma, semicolon or tab) is detected automatically. Your data stays in your browser.
How to convert CSV to JSON
- Paste CSV or open a
.csvfile. From Excel or Google Sheets, first save or download the sheet as CSV. - The JSON appears on the right, with the number of rows and columns.
- Adjust the options if needed, then copy or download
data.json.
Example
name,email,age
"Lee, Ann",ann@example.com,34
Bob Stone,bob@example.com,becomes:
[
{ "name": "Lee, Ann", "email": "ann@example.com", "age": 34 },
{ "name": "Bob Stone", "email": "bob@example.com", "age": "" }
]Options
- First row is headers: each row becomes an object with those names. Untick it to get an array of arrays instead.
- Convert numbers and true/false:
34becomes a number rather than the text"34". Values with leading zeros, such as zip codes and phone numbers, always stay text. - Separator: detected automatically, or choose comma, semicolon or tab.
Things to watch for
- Duplicate or empty column names get unique names (
name_2,column3) so no data is lost. - Rows with more values than headers are reported, and the extra values are dropped.
- Empty cells become empty strings. Replace them with
nullafterwards if your system needs that.
To check or tidy the result, paste it into the JSON Formatter. To go back the other way, use JSON to CSV, and to generate TypeScript types for the rows, useJSON to TypeScript.
Frequently asked questions
Does it handle commas and line breaks inside values?
Yes. Values wrapped in double quotes may contain commas, quotes (written as "") and line breaks, following the CSV standard.
Why is my zip code or ID still text?
Values with leading zeros, such as 007 or 01234, stay as text so the zeros aren’t lost. Very large numbers also stay text to avoid rounding.
My file uses semicolons.
The separator is detected automatically: spreadsheet programs in many European countries export CSV with semicolons. You can also choose it yourself.
How do I convert an Excel file?
In Excel or Google Sheets, choose File → Save as / Download → CSV, then open that file here.
Last updated