CSV is what you get when you export a spreadsheet. JSON is what most apps and APIs want. Our CSV to JSON Converter turns one into the other right in your browser, so your data never leaves your device.
How to convert CSV to JSON
- Paste your CSV data.
- Pick the delimiter: comma, semicolon or tab.
- Choose whether the first row holds column names.
- Copy the JSON output.
What the converter handles for you
- Quoted values with commas inside, like "Karachi, Sindh"
- Escaped quotes inside values
- Numbers and true/false converted to real JSON types
- Headers turned into object keys, or plain arrays if there's no header row
Example: CSV in, JSON out
Paste this CSV:
name,age,city
Ali,28,Lahore
Sara,24,"Karachi, Sindh"
You get an array with two objects. Ali's age becomes the number 28, not the text "28", and Sara's city stays "Karachi, Sindh" even though it contains a comma, because it was in quotes.
Common uses
- Loading spreadsheet data into a website or app
- Preparing test data for an API
- Turning a Google Sheets export into a config file
- Sharing data with developers in the format they prefer
Troubleshooting
- Everything ends up in one column: the delimiter is wrong. Try Semicolon or Tab.
- Keys have odd spaces: header names are trimmed automatically, but check for hidden characters if keys still look wrong.
- Numbers stayed as text: values with spaces or commas inside (like "1,000") are kept as text on purpose.
CSV and JSON in plain English
CSV stands for comma-separated values. It's the simplest way to store a table: one row per line, with commas between the columns. Every spreadsheet program can save and open it, which is why it's so common.
JSON stands for JavaScript Object Notation. Instead of rows and columns, it stores data as named fields, like {"name": "Ali", "age": 28}. Websites, mobile apps and APIs prefer JSON because each value comes with a clear label and the format can hold nested information.
Exporting CSV from Excel or Google Sheets
- Google Sheets: File, then Download, then Comma-separated values (.csv). Open the file in a text editor and copy the contents.
- Excel: File, then Save As, and pick CSV UTF-8. The UTF-8 version keeps special characters like accents and Urdu text intact.
- Tip: you can also select cells in a spreadsheet and paste them straight into the converter. They usually arrive separated by tabs, so set the delimiter to Tab.
How tricky values are handled
The converter follows the standard CSV rules. A value wrapped in double quotes can contain commas, so "Karachi, Sindh" stays one value. Two double quotes in a row inside a quoted value mean one literal quote mark. Numbers become real JSON numbers and the words true and false become real true/false values, which saves a cleanup step later.
One deliberate exception: values like "1,000" or "03001234567" are kept as text. Turning a phone number into a number would drop the leading zero, which is exactly the kind of quiet error that causes trouble later.
Common mistakes
- Wrong delimiter. If everything lands in one field, your file probably uses semicolons or tabs.
- Blank rows at the end. They're skipped automatically, so you don't need to delete them first.
- Duplicate column names. JSON objects can't have two keys with the same name, so the second one overwrites the first. Rename duplicate headers before converting.
- Uploading sensitive data to random converters. This one runs in your browser, so nothing leaves your device.
A worked example: product list for a website
Imagine you keep a small product list in Google Sheets with columns for name, price and stock. Your web developer asks for it in JSON. Download the sheet as CSV, paste it into the converter with "First row is header" set to Yes, and you'll get one object per product, like {"name": "Pink Salt Lamp", "price": 1500, "stock": 12}. Prices and stock arrive as numbers, ready to use.
If you update the sheet later, just repeat the steps. It takes less than a minute and nobody has to retype data by hand, which is where most mistakes creep in.
Checking the result
- Count the objects and compare with the number of rows in your sheet (minus the header).
- Spot-check two or three records against the original.
- Look for empty strings where you expected values; they usually mean a missing cell in the CSV.
- Paste the JSON into your app or a JSON viewer to confirm it loads without errors.
If something looks off, the problem is almost always in the source file rather than the conversion: a stray comma, a missing quote or a header with a typo. Fix it in the spreadsheet and convert again.
Benefits
- No upload: your data stays private
- Correct handling of tricky CSV
- Readable, indented JSON
- Instant and free