How to use it
This CSV to JSON converter turns a spreadsheet export or any delimited text into a JSON array in which each row becomes an object keyed by the header row. The delimiter is detected automatically, whether it is a comma, semicolon, tab or pipe, and quoting follows RFC 4180, so commas and line breaks inside quoted cells are read correctly. Your data is processed in the browser and never uploaded.
How to convert CSV to JSON
- Open the CSV in a text editor and copy it, or select the cells in your spreadsheet and copy them directly.
- Paste the text into the input box, making sure the first line holds the column names.
- Start the conversion with "Run tool" or Ctrl + Enter.
- Copy the indented JSON, or download it and rename the file to
.json.
Cells copied straight from a spreadsheet arrive tab-separated, and tab is one of the detected delimiters, so copy and paste is often quicker than exporting a file.
A worked example
Here is a small export with a few awkward details:
name,price,price,"Smith, John",19.90,"20,50",x,extra"He said ""hi""", 5 ," spaced "
The result is an array of two objects. In the first, name is Smith, John because the comma sits inside quotes, the duplicate header becomes price_2, the empty fourth header becomes column_4, and the surplus fifth cell is stored as column_5. In the second, the doubled quotes turn into He said "hi", the unquoted 5 is trimmed to "5", and the quoted " spaced " keeps its spaces. The second object has no column_5 key at all, because that row has fewer cells.
Parsing rules in brief
| Situation | Behavior |
|---|---|
| Delimiter | The most frequent of , ; tab and | outside quotes on the first line; a tie goes to the comma |
| Quoted field | Delimiters and line breaks inside it are part of the value |
Doubled quote "" | A literal quote character |
| Unquoted spaces | Trimmed at both ends |
| Duplicate header | Suffixed with _2, _3 and so on |
| Empty header or extra cell | Named column_N by position |
| Missing cell | Empty string |
| Blank line | Skipped |
| Unclosed quote | Error: Invalid CSV: a quoted field is not closed. |
Why every value stays a string
The output never guesses types: 19.90 becomes "19.90" and true becomes "true". That is deliberate. Type guessing is where CSV conversions quietly corrupt data: ZIP codes such as 02134 lose their leading zero, long account numbers lose precision, and 3,5 is ambiguous between a list and a European decimal. Keeping text lets you convert each field in code, where you know what it means.
Common jobs
- Seeding a database or mock API from a product list someone maintains in a spreadsheet.
- Turning a translation sheet into the JSON language files your app loads.
- Preparing fixtures for automated tests without hand-writing JSON.
- Feeding a static site generator with data that non-developers edit.
The reverse direction is covered by the JSON to CSV converter, but the round trip is not symmetric: that tool flattens nested objects into columns like customer.name, while this one does not rebuild nesting from dotted headers and simply creates a flat key called "customer.name". The CSV vs JSON guide explains when each format fits.
Privacy
Parsing runs in JavaScript in your browser, which matters when the file is a customer list or an order export: the data is not sent to the server, and the page only increments an anonymous usage counter. To inspect or validate the output, paste it into the JSON formatter.