CSV to JSON conversion turns a comma-delimited table into a JSON array in which every data row becomes one object and the first record supplies the property names. For beginners, the mapping is simple: headers become keys, rows become objects, and cells remain strings.

The CSV To JSON converter follows that model in your current browser tab. It does not infer a data schema or decide that text such as 001 should become a number. That conservative behavior makes the result predictable, although an application may need to convert selected strings into stronger types after checking their meaning.

csv to json for beginners
CSV to JSON for Beginners: Rows, Keys, and Strings

How CSV rows map to JSON

This product always treats the first record as the header row. Header names become the exact property names of every object, and header order determines property order in the generated JSON. Each later record becomes one object, while the collection of those objects is enclosed in a JSON array. The output is pretty-printed with two-space indentation.

For example, consider the header name,note and the data record "Doe, Jane",hello. The quoted comma belongs to the first cell, so the corresponding object is {"name": "Doe, Jane", "note": "hello"}. A simple comma split would incorrectly turn the first value into two fields.

CSV elementJSON result
First recordExact property names in their original order
Each later data recordOne object inside the output array
Each cellA JSON string
Quoted comma or line endingPart of the cell value rather than a new field or row

Property names and string values are escaped during serialization. Quotes, backslashes, control characters, and embedded line endings therefore remain valid JSON data. This follows the behavior of JSON.stringify; the result is data, not executable code.

Why every value remains a string

Type conversion is where many beginner conversions become surprising. This converter never guesses numbers, Booleans, null values, dates, formulas, or empty values from their spelling. The cell contents determine the JSON string, while the application that receives the JSON remains responsible for deciding whether and how to interpret those strings.

CSV cell spellingJSON valueResult
001"001"Leading zeros remain intact
true"true"It is not a JSON Boolean
null"null"It is not a JSON null
An empty cell""It is an empty string

Whitespace is also data. A cell containing spaces keeps those spaces, and a header such as Customer ID is not trimmed to Customer ID without those spaces. Date-like and formula-like text is not evaluated or reinterpreted. If an API requires a number or Boolean, explicitly transform the relevant values only after checking that their contents represent the intended type.

Convert a CSV file in the browser

  1. Prepare one comma-delimited table. Confirm that the first record is the header and that every header is nonempty and unique. Comparisons are exact and case-sensitive, so ID and id are different names. Keep intentional spaces, but remove accidental empty or duplicated headers before conversion.
  2. Paste the CSV and run the conversion. Paste the source text into the converter and start the conversion. There is no separate headerless mode: the first record is always treated as the header, even if your intended JSON structure would treat it as data.
  3. Check the conversion summary. Review the reported data-row count, column count, cell count, and UTF-8 output size. These figures help confirm that the whole table was processed and that the result fits within the converter's limits.
  4. Review the generated values. Check that the array contains one object per data row and that every cell is represented as a JSON string. Look especially at values containing commas, quotes, spaces, or line endings.
  5. Copy or download the result. Use the copy control or download converted.json. Retain the source CSV when the original quoting or line-ending style matters to a later audit or transformation.

Parsing, validation, JSON creation, copying, and download creation all happen locally; neither the CSV nor the JSON is uploaded. Editing the input immediately clears the previous output, summary, errors, and copy state, and it revokes the old JSON download. Run the conversion again after an edit. A failed conversion likewise leaves no stale download available.

CSV syntax that is accepted

The converter supports a defined RFC 4180-style dialect rather than trying to recognize every spreadsheet export automatically.

  • Comma is the only delimiter. Semicolons, tabs, and pipes are ordinary field characters. The converter does not auto-detect a different delimiter.
  • Fields can be unquoted or enclosed in double quotes. A quoted field may contain commas, CRLF, LF, or CR line endings, as well as doubled double quotes. Two consecutive quotes inside a quoted field decode to one literal quote.
  • Invalid quote placement is rejected. An unquoted quote is an error. After a closing quote, only a comma, a record ending, or the end of input is accepted. A trailing space or another character is rejected rather than silently discarded.
  • CRLF is the canonical record ending. Standalone LF and standalone CR are accepted as interoperability extensions. A line ending inside a quoted field remains part of the field and keeps its original spelling.

One leading UTF-8 byte-order mark, or U+FEFF, is consumed before header parsing. This also supports a BOM followed by a quoted first header. A U+FEFF in any later position remains field data. A file containing only the BOM is empty after normalization and produces a required-input error.

A final record ending is optional and does not create another empty record. A second consecutive ending does represent a blank record, and blank records are not silently discarded. That record must still contain exactly the same number of fields as the header.

Limits that determine whether conversion succeeds

The limits are explicit and are checked before or during the complete conversion. The following boundaries are accepted exactly.

ResourceMaximum
Raw pasted input5,000,000 UTF-16 code units
Data rows after the header10,000
Columns200
Data cells200,000
Generated JSON10,000,000 UTF-8 bytes

One additional unit, row, column, cell, or byte beyond a boundary fails explicitly; the converter does not silently cap the result. A short or long data row also fails, and a failure produces no partial JSON. The lower cell limit can reject a wide table before the row limit is reached.

The raw input budget is checked before a leading BOM is removed. Output size is measured in encoded bytes with TextEncoder, not JavaScript string length, so multibyte Unicode characters can consume more than one byte. No silent truncation is applied if the generated JSON crosses the output limit.

What the converter leaves to you

The conversion handles CSV structure and JSON serialization, but it does not fetch linked values, evaluate spreadsheet formulas, flatten structures, deduplicate records, rename keys, normalize Unicode, skip comments, or recover a valid prefix from a malformed file. It also does not validate whether the values make business sense.

Keep the original CSV if you need to reproduce its exact quoting or record-ending style later. The JSON output represents the field values, but it is not a byte-for-byte representation of the CSV source syntax. Even unusual headers such as __proto__, constructor, prototype, or toString are treated as ordinary string keys rather than inherited behavior.

The generated output is valid JSON data, but a receiving application must still parse and validate it against its own expectations. If you want an independent check after copying the result, run it through the JSON Validator to identify syntax errors or inspect the resulting structure.

Errors beginners can prevent

  • Treating the first row as data: The converter always uses the first record as the header.
  • Using another delimiter: A semicolon-delimited export remains one comma-delimited field unless you change the source first.
  • Leaving rows with different widths: Every data record must have exactly the header's field count.
  • Using blank or duplicate headers: Empty header names and exact duplicate names are rejected.
  • Adding characters after a closing quote: A space or other trailing character before the next delimiter is an error.
  • Expecting automatic typing or skipped blank rows: Cells remain strings, and genuine blank records remain records.

A dependable beginner conversion has three final checks: the header record is correct, every row has the same number of fields, and the resulting values are quoted strings. Confirm those points before copying or downloading the JSON for use in an application.

If you're weighing options, Excel Formulas Cheat Sheet for Beginners: 12 Functions covers this in detail.

If you're weighing options, How to Choose the Right JSON Diff Approach covers this in detail.