How to Convert CSV to JSON
- Paste your CSV data or upload a .csv file. The first row should contain column headers β they become the JSON keys.
- Check the delimiter. Standard CSV uses commas, but European spreadsheet exports often use semicolons and log files use tabs. Pick the one that matches your data.
- Convert and copy. Each data row becomes a JSON object, and the whole file becomes an array of objects β the exact shape most APIs, databases, and JavaScript applications expect. Download the result or copy it to your clipboard.
What the Conversion Actually Does
CSV is a flat, positional format: meaning depends on column order, and every value is just text. JSON is a structured, self-describing format: every value is labeled with a key and can carry a type. Converting between them means mapping each row to an object, using the header row as the keys:
name,email,age
Alice,alice@example.com,34
Bob,bob@example.com,28
becomes:
[
{ "name": "Alice", "email": "alice@example.com", "age": 34 },
{ "name": "Bob", "email": "bob@example.com", "age": 28 }
]
Numeric strings can be converted to real JSON numbers, and empty cells become empty strings or null. If you need to go the other direction β flattening API output into something a spreadsheet can open β use the companion JSON to CSV converter.
CSV Pitfalls This Tool Handles
Quoted fields with commas. A value like "Smith, John" contains a comma that is not a delimiter. Proper CSV parsing (RFC 4180) respects the quotes; naive string-splitting corrupts the row. This is the single most common cause of broken CSV conversions.
Line breaks inside cells. Spreadsheet exports can contain multi-line text in a single cell, wrapped in quotes. The parser treats it as one logical row even though it spans several physical lines.
Encoding issues. Excel often exports CSV in Windows-1252 rather than UTF-8, which mangles accented characters. If you see é where é should be, re-export from Excel using "CSV UTF-8".
Duplicate or missing headers. JSON keys must be unique within an object. Duplicate CSV headers get suffixed, and missing header cells fall back to generated names like column_3.
Frequently Asked Questions
Does my data leave my computer?
No β parsing and conversion run entirely in your browser, so the tool is safe for customer lists, financial exports, and other sensitive data.
Can I convert Excel files?
Save your sheet as CSV first (File → Save As → CSV UTF-8 in Excel), then convert here. Direct .xlsx parsing isn't supported because that format is a zipped XML archive, not plain text.
How large a file can I convert?
Files with tens or hundreds of thousands of rows convert in seconds. Beyond that, browser memory becomes the limit β for multi-gigabyte datasets, a command-line tool or a short script is the better choice.
What if my CSV has no header row?
Add one before converting, or the first data row will be consumed as keys. Headers like id,name,price take ten seconds to type and make the resulting JSON self-documenting.
How do I validate the JSON output?
Paste it into our JSON Formatter & Validator β it pretty-prints the structure and flags any syntax issues, and it's the natural next step before feeding the data into an API.