Skip to content
Devlar

Runs in your browser. Your input stays on your device.

CSV to JSON Converter

Turn CSV or TSV data into JSON. The converter detects the delimiter, shows a preview of the parsed rows, warns about uneven rows, and never rounds numbers or strips leading zeros.

Output shape
Parsing options

Opens a file from your device. The file is read in your browser and is not uploaded.

0 characters · 0 B

0 characters · 0 B

Privacy: This tool runs in your browser. Your input is processed on your device and is never uploaded to a server.

How to use

  1. Paste CSV into the input box, or select Open file to load a .csv, .tsv, or .txt file (you can also drop it on the box).
  2. Check the detected delimiter next to the Delimiter menu, and choose one manually if it is wrong.
  3. Look at the preview table below the converter to confirm the columns were split correctly. Warnings appear above it if any header names were renamed or rows have a different number of fields.
  4. Choose the output shape and indentation, and turn on type detection if you want numbers, true/false, and empty cells converted instead of kept as text.
  5. Short input converts as you type. For long input select Convert, or press Ctrl+Enter (Cmd+Enter on a Mac) anywhere in the tool, not only in the input box. Then copy the JSON or download it as data.json.

Example

Converted with a header row and type detection on. The zip code 07302 keeps its leading zero as text, 1250.50 keeps its exact digits, and the empty balance becomes null.

Input
CSV
id,name,city,zip,balance,active
1,Ayesha Khan,Lahore,54000,1250.50,true
2,"O'Brien, Liam",Dublin,D02,-75,false
3,Wei Zhang,上海,200000,0,true
4,"Sara ""Sam"" Lopez",Austin,07302,,true
Output
JSON
[
  {
    "id": 1,
    "name": "Ayesha Khan",
    "city": "Lahore",
    "zip": 54000,
    "balance": 1250.50,
    "active": true
  },
  {
    "id": 2,
    "name": "O'Brien, Liam",
    "city": "Dublin",
    "zip": "D02",
    "balance": -75,
    "active": false
  },
  {
    "id": 3,
    "name": "Wei Zhang",
    "city": "上海",
    "zip": 200000,
    "balance": 0,
    "active": true
  },
  {
    "id": 4,
    "name": "Sara \"Sam\" Lopez",
    "city": "Austin",
    "zip": "07302",
    "balance": null,
    "active": true
  }
]

Frequently asked questions

What does type detection change, and why is it off by default?

With type detection on, cells that are valid JSON numbers become numbers, true and false become booleans, and empty cells become null. Values with leading zeros, such as the zip code 02134 or the phone number 0300, stay text, because turning them into numbers would drop the zeros. Very large integers, such as 12345678901234567890, are written into the JSON exactly as they appear in the CSV; they are never squeezed through a JavaScript number, which would round them. Detection is off by default because a converter cannot know which columns are meant to be text, so keeping every value as a string is the choice that never loses information.

How is the delimiter detected?

The converter reads the first rows with each candidate delimiter (comma, semicolon, tab, and pipe) and picks the one that splits the most rows into the same number of columns. Delimiters inside quoted fields are ignored. Files exported with a semicolon, which is common in countries that use a comma as the decimal separator, are detected the same way. You can always choose the delimiter yourself.

What happens when rows have too many or too few values?

Nothing is thrown away. Missing values are filled with empty strings, and extra values are kept in new columns named column_4, column_5, and so on. A warning lists the line numbers of the affected rows (the first 50, plus a total), so you can decide whether the source file needs fixing.

Which CSV features are supported?

The parser follows RFC 4180: fields in double quotes can contain the delimiter, line breaks, and doubled quotes (""), and CRLF or LF line endings both work. A byte order mark at the start of the file is ignored. If a quoted field is never closed, the converter stops and reports the line and column where that field starts.

JSON to CSV Converter

Turn JSON arrays into CSV with flattened columns, exact numbers, Excel-friendly output, and formula injection protection.

JSON Formatter

Format and beautify JSON with your choice of indentation, and find syntax errors by line and column.

JSON Validator

Check JSON for errors with line, column, and code context, and catch duplicate keys and unsafe large numbers.

Keyboard shortcuts

Run the tool, from anywhere in it
Ctrl+Enter
Show this list (outside text fields)
?
Close this list
Esc