CSV To JSON

Convert CSV data into JSON

Convert CSV (comma, semicolon, tab or pipe separated) into JSON - as objects, arrays, or keyed by the first column - with numbers detected, nested keys from dotted headers and a preview table.
Try an example:

Output will appear here...

About CSV To JSON

How it works

  1. The CSV is parsed by the PapaParse library, which handles quoted fields, commas and line breaks inside quotes, and detects the delimiter.
  2. With a header row, each following row becomes an object using the headers as keys.
  3. Numbers and true/false are converted to real JSON numbers and booleans (turn this off to keep everything as text, e.g. for ZIP codes with leading zeros).
  4. The first 10 rows are shown in a preview table so you can check the columns.

What you need

  • CSV text, e.g. exported from Excel, Google Sheets or a database.

Tips

  • Excel in many European countries exports with semicolons - "Detect automatically" handles that.
  • Turn off number conversion to keep leading zeros (phone numbers, ZIP codes, IDs).
  • "Keyed by first column" is handy for lookups: {"alice": {...}, "bob": {...}}.

Runs in your browser. Everything happens in your browser - your code and data are never uploaded.

Frequently asked questions

Why did my ZIP code lose its leading zero?+

"Convert numbers" turns 01234 into the number 1234. Untick it to keep every value as text.