CSV to JSON Converter
Convert CSV or TSV data into JSON right in your browser. Quoted fields with commas and line breaks are parsed per RFC 4180, the delimiter (comma, semicolon, tab or pipe) is detected automatically, and numbers, true/false and empty cells can become real JSON types.
Paste CSV data or open a file to see the JSON here.
Usage examples
Turning a spreadsheet export into test fixtures
Export a sheet as CSV, paste it here, and keep 'Array of objects' selected. Each row becomes an object keyed by the header row, ready to drop into a seed script, a Jest fixture, or a mock API response.
Feeding data into a JavaScript chart
Libraries such as Chart.js and D3 commonly take an array of objects. With type detection on, a column like 'revenue' arrives as real numbers instead of strings, so you can plot it without calling parseFloat on every value.
Keeping ZIP codes and product IDs intact
Values with leading zeros such as '02134' or '007' stay strings because they don't match JSON's number format, so they aren't silently turned into 2134 or 7. If you want every value as a string, untick type detection.
Converting a semicolon-separated European export
Excel in many European locales saves CSV with semicolons because the comma is the decimal separator. Auto-detect picks the semicolon; note that a price like '9,99' stays a string, since a decimal comma isn't a valid JSON number.
Pasting cells straight from Google Sheets or Excel
When you copy a range of cells, the clipboard holds tab-separated text. Paste it in and auto-detect recognizes the tabs, so you can go from a selected table to JSON without saving a file first.
Quick reference
How single CSV cells become JSON values
| CSV | JSON — Detect numbers, booleans and empty cells: ON | OFF |
|---|---|---|
| 42 | 42 | "42" |
| 3.14 | 3.14 | "3.14" |
| -0.5 | -0.5 | "-0.5" |
| 1e3 | 1000 | "1e3" |
| 007 | "007" | "007" |
| +5 | "+5" | "+5" |
| TRUE | true | "TRUE" |
| false | false | "false" |
| (empty) | null | "" |
| null | "null" | "null" |
| 9007199254740993 | "9007199254740993" | "9007199254740993" |
| "Smith, John" | "Smith, John" | "Smith, John" |
| "He said ""hi""" | "He said \"hi\"" | "He said \"hi\"" |
Small CSV files and their JSON output (defaults: auto-detect, header row, type detection)
| CSV | JSON |
|---|---|
| name,age\nAnna,30\nBen,25 | [{"name":"Anna","age":30},{"name":"Ben","age":25}] |
| city,note\n"Seoul","line1\nline2" | [{"city":"Seoul","note":"line1\nline2"}] |
| name;price\nTee;9,99 | [{"name":"Tee","price":"9,99"}] |
| sku\tqty\nA-01\t3 | [{"sku":"A-01","qty":3}] |
| id,id,\n1,2,3 | [{"id":1,"id_2":2,"column3":3}] |
| a,b,c\n1,2\n1,2,3,4 | [{"a":1,"b":2,"c":null},{"a":1,"b":2,"c":3,"column4":4}] |
Frequently asked questions
Is my CSV uploaded to a server?
No. Parsing and conversion run entirely in your browser with JavaScript, and opening a file only reads it locally. Your input is saved in this browser's local storage so it survives a page reload; click Clear to remove it.
How are quotes, commas and line breaks inside a cell handled?
The parser follows RFC 4180: a field wrapped in double quotes may contain the delimiter, line breaks, and doubled quotes. So "Smith, John" stays one value, a quoted cell spanning two lines keeps its line break as \n in JSON, and ""hi"" inside a quoted field becomes a literal "hi".
Which values become numbers or booleans?
With type detection on, a cell becomes a number only if it matches JSON's number syntax exactly, such as 42, -0.5 or 1e3. Values like 007, +5, .5 or 1,000 stay strings. true and false (in any letter case, so Excel's TRUE/FALSE works) become booleans, and an empty cell becomes null. Turn the option off to keep every value as a string.
Why did a long ID number stay a string?
JavaScript numbers are 64-bit floating point and can only represent integers exactly up to 9,007,199,254,740,991 (2^53 − 1). A larger integer, such as a 19-digit order ID, would change its last digits if converted, so the tool keeps it as a string. Decimals with more than 15 significant digits are kept as strings for the same reason.
My file uses semicolons or tabs. Do I need to change anything?
Usually not. Auto-detect tries comma, semicolon, tab and pipe on the first 20 rows and picks the one that splits rows into a consistent number of columns. If a file is ambiguous, choose the delimiter manually. The UTF-8 byte order mark that Excel adds to 'CSV UTF-8' files is removed so it doesn't end up in the first key name.
What happens with empty or duplicate header names?
JSON object keys must be unique, so an empty header becomes columnN (its 1-based position) and a repeated header gets a suffix: a second 'id' becomes 'id_2'. A warning shows how many headers were renamed so you can fix the source if needed.
Should I choose 'Array of objects' or 'Array of arrays'?
An array of objects is the most common shape for APIs and front-end code because each value is addressed by its column name. An array of arrays is more compact, keeps the exact column order, and suits libraries or table components that expect rows as lists; with a header row, the header is the first inner array.