CSV to JSON

Parse CSV into an array of objects, with optional header row

How to use

Supports quoted fields, newlines inside fields and embedded quotes (escaped by doubling the quote). Choosing "first row as data" returns a 2D array instead of an array of objects.

FAQ

A comma inside a cell was split into two columns?

In standard CSV, content with a delimiter must be wrapped in double quotes. If the source did not add quotes, switch to a non-conflicting delimiter such as Tab or Pipe before converting.

Will numbers become strings?

By default everything is kept as a string to avoid mis-converting leading zeros, phone numbers and the like into numbers. Convert in code if you need numbers.