Text and data tools

CSV to JSON Converter

Turn header-based CSV into an array of objects.

Conversion input and options

0 / 5,242,880 characters

How it works

Use the first CSV row as property names and convert subsequent rows into JSON objects. Quoted commas and multiline cells are parsed correctly, and numeric-looking values remain strings.

The CSV rows code,name and 001,London produce an object whose code is "001". Preserving text helps protect postal codes and product IDs with leading zeros.

Input and output example

Input text

name,code,note
London,001,"Includes, comma"
Paris,002,Riverside

Converted text

[
  {
    "name": "London",
    "code": "001",
    "note": "Includes, comma"
  },
  {
    "name": "Paris",
    "code": "002",
    "note": "Riverside"
  }
]
Download example result

Tips

Give each header a distinct, nonempty name. Rows with mismatched column counts and malformed quotation marks are rejected to help avoid silently shifting or losing values.

Limits

Empty or duplicate headers are not accepted. Dates, numbers, and booleans are not automatically inferred, and the converter does not build nested JSON structures. Column names that are whole numbers without leading zeros, such as 2024, appear first in every object.

Common questions

Does it read semicolon- or tab-separated files?

Yes. The delimiter is detected from the data, so code;name and 001;Seoul produce the same object as the comma version. This helps with files exported by spreadsheet apps set to a region where the comma is the decimal separator.

What happens to blank lines and the byte order mark?

Blank lines are skipped, and a UTF-8 byte order mark at the start of the file is removed. The first column name therefore stays exactly as written instead of gaining an invisible character.

Which row does "row 3" in an error mean?

Rows are counted from the header, which is row 1, so row 3 is the second data row. A missing value, an extra comma, or a comma inside an unquoted value usually changes the column count.

Privacy notice · Report a problem · Contact