How to convert CSV to JSON
- Open a .csv file or paste the rows into the box and press Convert.
- Check the options: header row, number detection, nested keys, indentation.
- Copy the JSON or download it as a .json file.
From spreadsheet export to something your code can use
CSV is what you get out of nearly every admin panel, spreadsheet and database export. JSON is what your JavaScript app, REST endpoint, test fixture or NoSQL import expects. This converter bridges the two: each CSV row becomes one object, and the first row supplies the property names.
| CSV input | JSON output |
|---|---|
id,name,active | [{"id": 7, "name": "Lopez, Ana", "active": true}] |
Notice what happened in that example. The comma inside the quoted name didn't split the field, the 7 came out as a number and true became a real boolean instead of a string. That's the kind of detail that decides whether the output can be used as-is or needs another round of cleanup.
A parser that handles real-world CSV
- Quoted fields with commas, doubled quotes (
"") and even line breaks inside a cell are read correctly, following the common RFC 4180 rules. - Separator detection: comma, semicolon, tab and pipe are recognized automatically from the first rows. Files from European versions of Excel often use semicolons, and this catches that. You can override the choice.
- Encoding: UTF-8 is expected, with or without a byte-order mark. Older Windows exports that aren't valid UTF-8 are read as Windows-1252 so accented letters survive.
- Duplicate or empty headers get unique names (
email_2,column_4) so no values are lost when keys collide.
Options that shape the JSON
Real values. With number detection on, 42, -3.5 and 1e6 become numbers, and true/false become booleans. Values that only look numeric stay strings on purpose: 00501 keeps its leading zeros (ZIP codes, product codes) and numbers with more than 15 significant digits, such as 20-digit order IDs, are kept as text so no digit gets rounded.
Nested objects. Column names like address.city and address.zip can be turned into {"address": {"city": …, "zip": …}}. That's the reverse of the flattening done by JSON to CSV, so a round trip gives you back the original shape.
No header row? Untick the header option and each row becomes an array of values instead of an object.
Pretty or compact. Indented output is easier to read and review; compact output is smaller when you're embedding data in a request.
Private by design
Customer lists, payroll exports and internal reports shouldn't be pasted into random web services. The parsing here runs in your browser tab, so the data never leaves your machine. Files with hundreds of thousands of rows are processed in slices to keep the page responsive, and the preview shows the beginning while Copy and Download always give you the full result. Working from an .xlsx instead? Use Excel to JSON, which skips the CSV step.
More ways to use this tool
Frequently asked questions
Is my CSV data uploaded?
No. The conversion runs entirely in your browser. Nothing you paste or open is sent anywhere.
Why are some numbers still in quotes?
Values with leading zeros like 00123, or numbers with more than 15 digits, stay strings so they aren't changed. Turn off number detection if you want every value as a string.
My file uses semicolons. Will it work?
Yes. The separator is detected automatically, and you can pick comma, semicolon, tab or pipe yourself if the guess is wrong.
Can I get nested JSON from a flat CSV?
Yes. Name your columns with dots, such as user.name and user.email, and turn on the nested objects option.
How large a CSV can it handle?
Files of tens of megabytes work on most computers. The preview shows the first part only, while the download contains every row.