pegbenchAll tools
Developer

CSV ⇄ JSON Converter

Convert CSV to JSON and JSON to CSV online. Upload a file or paste data, detect delimiters automatically and download the result.

About the CSV ⇄ JSON Converter

Move data between spreadsheets and apps. Paste or upload a CSV exported from Excel or Google Sheets to get clean JSON, or turn a JSON array back into a CSV you can open in any spreadsheet.

How to use it

  1. Choose the direction: CSV to JSON or JSON to CSV.
  2. Paste your data or upload a file.
  3. Copy or download the converted output.

CSV to JSON

With ‘First row is header’ ticked, each row becomes an object whose keys are the column names, which is the format most APIs and JavaScript code expect. Untick it to get an array of arrays instead. ‘Convert numbers & booleans’ turns values like 42 and true into real numbers and booleans rather than text.

The parser detects commas, semicolons and tabs automatically and handles quoted fields containing commas, quotes and line breaks, which simple split-on-comma approaches get wrong.

JSON to CSV

Paste an array of objects such as [{"name":"Nimal","city":"Colombo"}]. Every key becomes a column, and values containing commas or quotes are quoted correctly so the file opens cleanly in Excel, Google Sheets or Numbers.

Excel tips

To get a CSV out of Excel, choose File → Save As → ‘CSV UTF-8’. The UTF-8 option keeps Sinhala, Tamil and other non-English text intact. Your data is converted in the browser and never uploaded.

Frequently asked questions

Does it handle commas inside values?

Yes. Quoted fields, embedded commas, line breaks and different delimiters (comma, semicolon, tab) are handled by the PapaParse library.

How do I convert an Excel file?

In Excel choose File → Save As → CSV, then upload that file here.

What JSON shape is needed for JSON to CSV?

An array of objects, for example [{"name":"A","age":30}]. Each key becomes a column.

Related tools