CSV to JSON Converter

Or enter CSV manually below
📝

Cleared

Copied

Enter CSV in the editor and click 'Convert' to get JSON output.

How CSV to JSON Converter Works?

What's a valid CSV input for this tool?

A valid CSV input has a header row with column names, followed by data rows. Values must be separated by commas and each line represents a new record. For example:

name,age,city
Alice,30,New York
Bob,25,Los Angeles

What does the output look like?

The output will be a JSON array. Each CSV row becomes an object with column headers as keys. The output of the above CSV will be:

[
  {
    "name": "Alice",
    "age": 30,
    "city": "New York"
  },
  {
    "name": "Bob",
    "age": 25,
    "city": "Los Angeles"
  }
]

What if my CSV has empty values?

Use consecutive commas (,,) to represent empty values. If the empty value is at the end of a row, just include a trailing comma.

The empty values in the CSV will be converted as empty strings. For example:

name,age,city
Alice,,

is converted to

[
  {
	"name": "Alice",
	"age": "",
	"city": ""
  }
]