CSV to JSON

Convert CSV files or pasted CSV data into a JSON array with headers as keys. Download the JSON or copy it instantly.

  • Free, no sign-up
  • Files stay on your device
  • Works on mobile
Loading tool…

CSV to JSON converts comma-separated rows into a JSON array of objects, using the header row as the keys. A line like name,email becomes { "name": ..., "email": ... } for every record, which is the shape most JavaScript apps, APIs and NoSQL databases expect.

Developers seed databases from exported spreadsheets, front-end builders feed product lists into static sites, and analysts reshape survey exports for a script. CSV files vary, so you can set the delimiter, such as comma, semicolon or tab; European versions of Excel often export with semicolons, which would otherwise squeeze every column into one field.

How to use CSV to JSON

  1. Choose or drop a .csv file, or paste CSV text, into the main area.
  2. In the settings panel on the right, set the delimiter (comma, semicolon, tab) and confirm the first row contains headers.
  3. Press Convert to JSON.
  4. Copy the JSON or download it as a .json file.

Features

  • Conversion runs in your browser; customer lists and exports are not uploaded.
  • Header row becomes object keys, producing an array of records.
  • Handles quoted fields that contain commas or line breaks.
  • Values are output as text unless numeric conversion is offered in settings; check numbers like ZIP codes with leading zeros.
  • Duplicate or empty header names should be fixed first, since keys must be unique.

When to use it

  • Turning a product spreadsheet exported as CSV into a JSON file for a static website.
  • Preparing test data for an API from a CSV of sample users.
  • Importing a CSV mailing list into a NoSQL database that accepts JSON.

Frequently asked questions

My data ends up in one field. What went wrong?

The file probably uses semicolons or tabs. Change the delimiter in settings to match your file.

What if my CSV has no header row?

Add a header line with column names first, or the first data row will be used as keys.

How is this different from Excel to JSON?

CSV to JSON reads plain text CSV files. Excel to JSON reads .xlsx workbooks directly and lets you choose a sheet, so you don't have to export to CSV first.

Are special characters preserved?

Yes, if the CSV is saved as UTF-8. Files saved in older encodings may show garbled accented characters.