CSV to JSON

Convert CSV or data copied from a spreadsheet into a JSON array of objects or arrays.

Runs in your browser

CSV

JSON

Converted in this browser tab. Nothing is uploaded.

How to use the CSV to JSON

  1. Paste CSV, paste cells copied from a spreadsheet, or open a .csv file.
  2. The delimiter is detected automatically, or you can choose it.
  3. Choose objects (using the header row as keys) or arrays.
  4. Copy or download the JSON.

Example

CSV with a header row
Input
sku,name,price,in_stock
00123,"Desk lamp, brass",49.90,true
00456,Notebook,4.5,false
Result
[
  { "sku": "00123", "name": "Desk lamp, brass", "price": 49.9, "in_stock": true },
  { "sku": "00456", "name": "Notebook", "price": 4.5, "in_stock": false }
]

What it does

Safe type detection
Numbers and true/false become JSON values only when no information would be lost, so ZIP codes, phone numbers and IDs with leading zeros stay as text.
Paste from a spreadsheet
Cells copied from Excel or Google Sheets are tab-separated, and the tab delimiter is detected.
Reports problems
Rows with a different number of fields from the header, and duplicate column names, are flagged.

Frequently asked questions

Why is "00123" a string and not a number?

Converting it to a number would drop the leading zeros and change the value. Numbers are converted only when they read back exactly the same.

Can it handle quoted fields with commas and line breaks?

Yes. Fields in double quotes can contain commas, line breaks and escaped quotes ("").

Is my data sent to a server?

No. The conversion runs in your browser, and nothing you paste is uploaded, logged or stored.