How to use the csv to json converter
- Paste CSV text, cells copied from a spreadsheet, or open a .csv or .tsv file from your device.
- Check the detected delimiter, or pick comma, semicolon, tab or pipe explicitly if the guess is wrong.
- Choose Array of objects (uses the first row as keys) or Array of arrays, and whether to trim cells, convert numbers and booleans, or turn empty cells into null.
- Copy the JSON or download it as a .json file.
Features
- RFC 4180 parsing: quoted fields, doubled quotes, embedded commas and multi-line cells
- Automatic detection of comma, semicolon, tab and pipe delimiters
- Objects or arrays, pretty-printed or minified output
- Optional type inference for numbers and true/false, trimming, and empty-to-null
- Duplicate or blank headers are made unique so no data is lost
- Row and column counts, output size and a warning for unclosed quotes
How the conversion works
The text is read character by character. Outside quotes, the delimiter ends a field and a line break ends a row; inside a quoted field everything is literal, and a doubled quote ("") stands for one quote character. The first row optionally becomes the key list; every subsequent row becomes an object with those keys, so JSON consumers always find the same properties on every record.
Cells are strings by default. With type inference on, values that look like numbers (42, -3.5, 1e6) become JSON numbers and true/false become booleans, but values with leading zeros such as 007 or more than 15 significant digits stay strings so IDs and phone numbers aren't mangled.
Delimiter detection
The first 25 non-empty lines are scanned and the candidate delimiter that appears a consistent number of times per line wins. European spreadsheets often export with semicolons because the comma is the decimal separator; tab-separated exports are common from databases. If your data has only one column, detection can't tell, so pick the delimiter manually.
Limits and privacy
Files up to 10 MB can be opened and inputs up to about 3 million characters are converted live; larger inputs should be split. Parsing happens in your browser, which makes the tool suitable for exports that contain personal data.