CSV to JSON Converter for CSV and TSV Files of Any Size

Convert CSV or TSV to JSON with delimiter detection, header control and safe type detection. Handles quoted cells and large files in your browser.

Runs in your browser. Nothing is uploaded.

Converters

CSV to JSON

CSV or TSV

Max 50MB each

Files are read in your browser and never uploaded. Up to 50 MB, UTF-8 text.

Result

Paste CSV or TSV on the left, or load the sample. JSON appears here as you type.

Example

Input
id,name,active,zip
1,Asif,true,00123
2,"Lee, Kim",false,54000
Result
[
  { "id": 1, "name": "Asif", "active": true, "zip": "00123" },
  { "id": 2, "name": "Lee, Kim", "active": false, "zip": 54000 }
]

Using the converter

Paste CSV or TSV text, drop a file on the input, or load the sample. The JSON updates as you type. The delimiter is detected from the first lines: the tool counts commas, semicolons, tabs and pipes outside quoted text and picks the one that splits the lines into the same number of fields. If detection guesses wrong on an unusual file, choose the delimiter yourself. You can switch between an array of objects, where the header row supplies the keys, and an array of arrays, which keeps the header as the first row.

Cells in quotes may contain delimiters, doubled quotes and line breaks, including Windows CRLF breaks. A leading byte order mark is removed. Spaces around cells and column names are trimmed by default, blank lines are skipped, and empty cells can become null instead of an empty string. If a column name is duplicated or empty it gets a numeric suffix such as name_2 or column_3, and the tool says so.

Type detection that does not corrupt data

With type detection on, true and false become booleans, null becomes null, and numbers become JSON numbers. The rules are deliberately cautious. Anything with a leading zero, such as the zip code 00123 or a phone number, stays a string, because turning it into the number 123 destroys information. A number with more than 15 significant digits, for example a 19-digit id, also stays a string, since JSON parsers in JavaScript would round it. Values such as 1,000 or +44 7700 are text too. Switch detection off to keep every cell a string.

This matters because naive converters turn identifiers into numbers. A product code 1E5 or a long order number can silently change. If you need a specific column to be numeric and the tool left it as text, convert it in your code after parsing, where you know the schema.

Errors, warnings and big files

A quote that opens a cell and never closes would swallow the rest of the file, so the tool refuses that input and points to the line and column where the quote opened. A closing quote followed by more text, as in "x"y, is reported with its line and an explanation: inside a quoted cell a literal quote is written as two quotes. Rows with more or fewer cells than the header are still converted, with missing values set to null and extra values kept under an __extra key, and a warning lists the first line numbers affected.

Inputs above about one megabyte are parsed in a background worker, so typing and scrolling stay smooth. Files up to 50 MB can be loaded; a file over one megabyte is not shown in the editor, only its result. Huge JSON output is truncated in the preview but copy and download always use the full text. For files in the gigabyte range use a streaming command-line tool, because a browser tab has to hold the whole text in memory.

Frequently asked questions

How does it detect the delimiter?

It counts commas, semicolons, tabs and pipes outside quotes in the first lines and picks the one that gives the same number of fields on most lines. You can override it.

Why is my zip code or id still a string?

Values with leading zeros and numbers with more than 15 digits are kept as strings on purpose, because converting them to JSON numbers would change or round them.

Can it convert TSV or semicolon files?

Yes. Tab, semicolon and pipe delimiters are detected automatically or can be chosen from the Delimiter list.

What happens when a row has the wrong number of cells?

The row is kept: missing values become null and extra values go into an __extra array. A warning names the first affected line numbers.

Is the file uploaded?

No. Parsing happens in your browser, in a background worker for large inputs.

Related tools