CSV → JSON

Convert CSV to JSON array. First row becomes object keys. Handles quoted fields, embedded commas, and escaped quotes.

CSV input
JSON output3 rows · 3 cols
[
  {
    "name": "Alice",
    "age": "30",
    "city": "Jakarta"
  },
  {
    "name": "Bob",
    "age": "25",
    "city": "Bandung"
  },
  {
    "name": "Carol",
    "age": "35",
    "city": "Surabaya"
  }
]

How CSV to JSON Conversion Works

CSV (Comma-Separated Values) is one of the most common data exchange formats used in spreadsheets, databases, and data pipelines. This tool converts CSV text into a JSON array of objects, where each row becomes an object and the first row defines the property names.

Conversion Example

CSV InputJSON Output
name,age,city Alice,30,NYC Bob,25,LA[ {"name":"Alice","age":"30","city":"NYC"}, {"name":"Bob","age":"25","city":"LA"} ]

CSV Parsing Rules (RFC 4180)

The converter follows the RFC 4180 standard for CSV parsing:

  • Delimiter: Comma (,) separates fields
  • Quoting: Fields containing commas, quotes, or newlines must be enclosed in double quotes
  • Escaping: Double quotes inside quoted fields are escaped by doubling them ("")
  • Line endings: Both CRLF and LF are accepted
  • Header row: The first row is always used as JSON property names

Frequently Asked Questions

How does the CSV to JSON conversion work?

The converter parses your CSV data using the first row as object property names (keys). Each subsequent row becomes a JSON object with values mapped to those keys, producing an array of objects.

Does it handle commas inside quoted fields?

Yes. Fields enclosed in double quotes can contain commas, newlines, and other special characters without breaking the CSV parsing. The converter follows the RFC 4180 CSV specification.

What delimiter formats are supported?

The default delimiter is a comma (,), which is standard for CSV. The tool also correctly handles TSV (tab-separated) input and semicolon-delimited formats commonly used in European locales.

Is my data sent to a server?

No. All conversion runs entirely in your browser using JavaScript. Your data never leaves your device, making it safe for sensitive or proprietary CSV files.

What happens with empty CSV cells?

Empty cells are converted to empty strings ("") in the resulting JSON. If a row has fewer columns than the header, the missing values are set to empty strings as well.