What the converter produces

Paste CSV and the page returns pretty-printed JSON. With the header option on, which is the default, the first row names the fields, and each remaining row becomes an object. The default input of name,value followed by Alice,42 produces an array with one object that has name set to Alice and value set to 42, where 42 is a string. With the header option off, the page returns an array of arrays, one per row, including the first. All values stay strings, so the output reflects exactly what the file contained and leaves any typing decisions to your own code.

Why strings only

CSV has no data types. A cell reading 007, 1E3, 2024-03-01 or TRUE is only text until a program decides otherwise, and guessing can change data. Leading zeros in a postal code vanish when 02134 turns into 2134. A long identifier loses digits when read as a floating-point number, and the text 1E3 can become 1000. By keeping every cell as a string, the page avoids those surprises. If you need numbers or booleans, convert the specific columns in your own code, where you know which fields are numeric and how to handle blanks. That step belongs after a lossless conversion, not inside it.

Quoted fields and commas

RFC 4180 defines the common CSV format. A field that contains a comma, a double quote or a line break must be enclosed in double quotes. Inside a quoted field, a double quote is written twice. The parser handles all of these. A row like Bob,"likes tea, and coffee" produces two fields, with the comma kept inside the second one. A cell written as "She said ""hi""" becomes She said "hi". Line breaks inside quotes stay part of the cell and appear as \n in the JSON output. Both CRLF and LF line endings are accepted as record separators, and a final newline at the end of the file does not create an empty row.

Headers and key rules

When the header option is on, the first row must contain nonempty names that are all different, since JSON object keys need to be unique. A file with two columns both named id, or one with an empty header cell, is rejected rather than having a column silently overwritten. Rename the columns in the source or switch the header option off and take the first row as data. Header names are used exactly as written, including case and spaces, so Name and name are different keys. Surrounding whitespace is not trimmed, so check for a stray space after a comma in the header row.

Rows must have the same width

Every record must have the same number of fields as the first. A row with a missing or extra comma raises an error instead of producing a short or long object. This catches common export problems such as an unquoted comma in an address, which splits one field into two. When you see the error, find the row with the wrong count and quote the field that contains the comma. The same check applies when headers are off. Blank lines in the middle of the data count as rows with a single empty field, so remove them if the file has more than one column.

Spreadsheet exports and delimiters

The page expects commas. Files exported from spreadsheets in some regions use semicolons or tabs because the comma is the decimal separator there, and those files will not split into columns here. Replace the delimiter with commas in your export settings, or save as comma-separated UTF-8. A leading byte order mark is another frequent surprise in files saved by spreadsheet software, and it can attach to the first header name. If the first key looks strange, check for an invisible character at the start. Excel may also convert long numbers or dates before you ever export, so the damage can be done before this page sees the file. Opening a CSV in a spreadsheet and saving it again can silently change values such as 1-2 into a date, so prefer exporting once from the original source and keep that file untouched.

Reading the JSON output

The output is indented with two spaces. Each object lists its keys in the same order as the header row. Numbers appear in quotes, which is correct and expected. Empty cells appear as empty strings, not null, since CSV cannot distinguish a blank from a missing value. With headers off, the output for a,b followed by 1,2 is an array of two arrays, each holding strings. You can paste the result into a JSON validator, a test fixture, an API request body or a configuration file. For very large datasets, a script or command-line tool is more practical than a browser form.

A small worked example

Consider an export with a header row id,city,note followed by a record 1,Lisbon,"hot, dry" and a record 2,Oslo,"cold". With headers on, the result is two objects. The first has id "1", city "Lisbon" and note "hot, dry". The second has id "2", city "Oslo" and note "cold". The quoted comma stays inside the first note, and both ids stay strings. Turning the header option off returns three arrays, the first containing id, city and note. Pick the mode that matches whether the first row describes the columns or is data in its own right. RFC 4180 itself is an informational document that records common practice and registers the text/csv media type, so real files vary, and a quick look at the first few lines of a file tells you which quoting habits the producer used.

Row limits and quoting errors in CSV input

Input is processed in your browser and limited to 1 MiB of UTF-8 text and 10,000 rows. The page rejects unclosed quotes, a quote in the middle of an unquoted field, ragged records, duplicate headers and empty headers. It does not infer numbers, dates or booleans, and it does not support other delimiters, comments or schema validation. It does not repair malformed files either, so errors show where the structure breaks the rules. Check the converted output against the source before using it in production, especially for files that come from sources you do not control.