1. Home
  2. Coding Tools
  3. CSV to JSON Converter

CSV to JSON Converter

Convert CSV data exported from Excel or Google Sheets into a JSON array of objects, with automatic delimiter detection and number conversion.

Runs locally in your browser. Your files and data are never uploaded or stored.

About the CSV to JSON Converter

The CSV to JSON Converter transforms spreadsheet data into JSON, the format used by web APIs, JavaScript apps, NoSQL databases and configuration files. Each row becomes an object whose keys come from the header row.

The converter uses a proper CSV parser that handles quoted fields containing commas, quotes and line breaks, and it automatically detects comma, semicolon, tab or pipe delimiters. Numbers and true/false values are converted to real JSON types (leading-zero values like phone numbers and ZIP codes are kept as text). Turn off the header option to get an array of arrays instead.

Example: from spreadsheet rows to JSON

Paste these rows copied from Excel or Google Sheets:

name,city,orders,vip
Ayesha,Lahore,12,true
Bilal,Karachi,3,false

and you get an array of objects, with numbers and true/false converted to real JSON values:

[
  {
    "name": "Ayesha",
    "city": "Lahore",
    "orders": 12,
    "vip": true
  },
  {
    "name": "Bilal",
    "city": "Karachi",
    "orders": 3,
    "vip": false
  }
]

Tips for a clean conversion

  • Use short, simple headers. They become your JSON keys, so order_date is easier to use in code than Order Date (dd/mm).
  • Keep codes with leading zeros as text. Values like 03001234567 or ZIP code 01234 stay as strings so the zero is not lost.
  • Remove totals and notes under the table before copying. Every line becomes a record.
  • Semicolon files from Europe are detected automatically, so you do not need to change the separator first.

Common uses: loading a product list into a website, preparing test data for an API, and moving data from a spreadsheet into a NoSQL database.

How to use the CSV to JSON Converter

  1. Paste CSV data or copy cells from Excel/Google Sheets.
  2. Choose whether the first row is a header and whether to convert numbers.
  3. Review the JSON output.
  4. Copy it or download data.json.

Frequently asked questions

Can I paste directly from Excel?

Yes. Copied cells are tab-separated, which the converter detects automatically.

Why are some numbers kept as text?

Values with leading zeros, such as phone numbers or postal codes, stay as strings so they are not changed.