CSV to JSON Converter

Convert your Excel/CSV data into structured JSON arrays instantly. Fast, secure, and works entirely in your browser.

CSV Input (Paste Here)
JSON Result

From Spreadsheet to JSON in One Step

CSV (Comma-Separated Values) is the simplest way to move table data out of Excel, Google Sheets or a database export. JSON is the format web apps, APIs and JavaScript understand. If you have product lists, student records, price sheets or contact lists in a spreadsheet and need them in a website or app, this converter turns each row into a JSON object, using the header row as keys.

How to Use the CSV to JSON Converter

  1. Export your sheet as a .csv file and open it in any text editor.
  2. Paste the data into the CSV Input box, or click Load Sample.
  3. Click Convert to JSON.
  4. Copy the formatted JSON array from the output panel.

Example

CSV input:

id,name,city,fee
101,Aman Sharma,"Jaipur, Rajasthan",4500
102,Sita Gupta,Mumbai,5200

JSON output:

[
    {
        "id": 101,
        "name": "Aman Sharma",
        "city": "Jaipur, Rajasthan",
        "fee": 4500
    },
    {
        "id": 102,
        "name": "Sita Gupta",
        "city": "Mumbai",
        "fee": 5200
    }
]

Notice that the quoted city keeps its comma, and numeric columns become real JSON numbers.

CSV Formatting Rules

  • The first row contains column headers.
  • Each following row is one record, with values separated by commas.
  • Values containing commas, quotes or line breaks are wrapped in double quotes.
  • A double quote inside a quoted value is written twice: "He said ""hello""".
  • Every row should have the same number of columns as the header.

Excel and Google Sheets follow these rules automatically when exporting, so exported files usually convert without any changes.

Common Problems and Fixes

ProblemCauseFix
Columns shiftedUnquoted comma inside a valueWrap the value in double quotes
Broken characters (₹, é)File not saved as UTF-8Use “CSV UTF-8” when saving from Excel
Leading zeros lostValue treated as a numberHandle PIN codes and phone numbers as strings in your code
Everything in one columnFile uses semicolonsRe-export with commas as the separator

Why Developers Need This

  • Seeding databases with initial data from a client’s spreadsheet.
  • Building static websites where product or menu data lives in a JSON file.
  • Mock APIs for front-end development and testing.
  • Charts and dashboards that read JSON data.

Related Tools

Frequently Asked Questions

In Excel or Google Sheets, save or download the sheet as CSV (File → Save As → CSV, or File → Download → .csv). Open the file in a text editor, copy everything, paste it here and click Convert to JSON.
Yes. The first row is used as the JSON keys for every object, so make sure it contains clear column names such as id, name and city.
Wrap the value in double quotes, as spreadsheet programs do automatically, for example "Jaipur, Rajasthan". The converter keeps quoted commas, line breaks and doubled quotes ("") inside the value.
Yes. Values that look like numbers become JSON numbers, and everything else stays a string. Be careful with values like phone numbers or PIN codes with leading zeros, which lose the zeros when converted to numbers; treat them as strings in your code.
The converter expects commas. If your file uses semicolons or tabs, replace them with commas in a text editor first, or export again from your spreadsheet with comma as the separator.
No. The conversion happens entirely in your browser, which makes it safe for customer lists and other private data.