CSV table to JSON array

This online calculator converts CSV table to JSON array of objects, using given map of CSV columns to object properties.

This online calculator can help you if you have a set of data in the form of a CSV table and want to make it usable inside your Javascript program quickly. It could be test harness data, dummy data, or whatever.
Here is how it work

  1. Set up CSV columns to object properties mapping. You should specify them using the same separator as in the CSV file. If you omit the name, this column will be skipped.
  2. Paste your CSV contents
  3. Tweak fields separator if needed. Default is the semicolon.
  4. Decide if you want empty strings replaced with nulls

As a result, you will get JSON which can be copied to wherever you need.
If, by some chance, you have an error line - which is when the number of fields does not match the number of properties, line number and line text will be reported, so you can find and fix it.

See example


CSV to JSON array

Error line number
Error line

URL copied to clipboard
PLANETCALC, CSV table to JSON array