CSV to JSON Converter (and JSON to CSV)

Use this csv to json converter to move data between spreadsheets and code. Paste or open a CSV to get a JSON array using your header row, or paste JSON to get CSV back. Pick the delimiter, preview the table and download.

CSV to JSON Converter

CSV to JSON and JSON to CSV.

or drop a file here
CSV parsing uses PapaParse, which follows the CSV standard (RFC 4180): values with commas, quotes or line breaks must be in double quotes. When converting JSON to CSV, nested objects and arrays are written as JSON text in a single cell.
Everything runs in your browser. Nothing you enter or upload is sent to a server.

How to use the CSV to JSON converter

  1. Paste CSV data, or open a CSV, TSV or JSON file.
  2. Keep First row is header ticked to use column names as JSON keys.
  3. Press Convert. Switch to JSON to CSV to go the other way.
  4. Press Copy or Download to save the result.

How it works

The CSV is read with PapaParse, a robust open-source parser that detects the delimiter, handles quoted fields and can turn numbers and true/false into real JSON types. Each row becomes a JSON object keyed by the header. For JSON to CSV, the keys of all objects become the columns and each object becomes a row.

Example

The CSV "name,age" with rows "Ann,30" and "Bob,25" becomes [{"name": "Ann", "age": 30}, {"name": "Bob", "age": 25}].

Frequently asked questions

How do I convert an Excel file to JSON?

In Excel or Google Sheets, save or download the sheet as CSV, then open that file here.

What if my data uses semicolons?

The delimiter is detected automatically. You can also pick it by hand.

Can I convert JSON to CSV?

Yes. Choose JSON to CSV and paste an array of objects.

Is my data uploaded?

No. Everything is converted in your browser.

See also: JSON Formatter, PDF to Excel.

Convert CSV and JSON

How to use it

  1. Paste or open a file.
  2. Pick the direction.
  3. Set the delimiter.
  4. Download the result.

More questions

Does it use the header row?

Yes. The header row becomes the JSON keys.

Can it handle semicolons?

Yes. Pick a semicolon as the delimiter, which is common in European CSV files.

Is my data uploaded?

No. Everything stays in your browser on your device.

Related tools: JSON Formatter & Validator, YAML to JSON Converter, Online Spreadsheet.