WebTools

CSV to JSON

Detects the separator, respects quotes and types the values.

Turn a table into a list of JSON objects, with the headers as field names. The separator is detected from the first line, but you can force it if detection goes wrong.

The reader follows RFC 4180: it respects quotes, doubled quotes inside a value, and line breaks in the middle of a quoted field.

How to use it

  1. Paste the CSV or open the file.
  2. Check that the separator and the header box are right.
  3. Copy the JSON or download it.

Frequently asked questions

What does converting numbers and booleans do?
Without it everything comes out as quoted text. With it, “42” becomes the number 42 and “true” the boolean. Values that look numeric but are not — a postcode with a leading zero — are left as text.
My CSV has no headers.
Untick the box. Each row comes out as a list of values instead of an object with field names.
What if two columns share a name?
The second wins, because a JSON object cannot have two identical keys. Rename one of the columns before converting.

Related tools