CSV to JSON without surprises
Spreadsheet exports are messy: semicolon delimiters from European Excel, stray blank lines, quoted commas. This converter handles them, keeps ZIP codes and long IDs as text, and lets you choose the JSON shape your code expects.
When you need CSV as JSON
CSV is the format spreadsheets and database exports speak; JSON is what APIs, front-end code and document databases expect. Converting between them is a daily task when you seed a test database, mock an API response, or load a spreadsheet into a script. Each CSV row becomes one JSON object and each header becomes a key, so a file with the columns id,name,plan turns into an array of {"id": 1, "name": "Ada", "plan": "Pro"} objects.
Common problems with CSV files
- Delimiters. Excel in many European locales saves with semicolons, and some exports use tabs. Choose the delimiter that matches your file if detection guesses wrong.
- Quoted commas. A value like
"Okafor, Chidi"is one field, not two. Check the preview before copying the result. - Leading zeros. ZIP codes such as
02134and long numeric IDs lose information when turned into numbers, so keep them as text. - Empty cells. Decide whether blanks should become empty strings or
null; downstream code often treats the two differently.
Going the other way, or deciding which format fits your project, is covered in JSON vs CSV: when to use which. To inspect a large CSV before converting it, use the CSV Viewer.
How to use CSV to JSON
- Paste CSV or drop a
.csv/.tsvfile. - Adjust the delimiter, header row and type detection if needed.
- Pick the output shape — array of objects is the most common.
- Copy or download the JSON, or flip to the Table tab to check the data.
Private by design
CSV to JSON runs entirely in your browser. Your data is parsed and converted on your device with JavaScript — it is never sent to a server, logged or used for analytics. Recent inputs are kept in your browser’s own storage so you can come back to them, and they disappear when you clear cookies and site data (or press Clear history). You can verify this in your browser’s network tab.
Frequently asked questions
Does it detect the delimiter automatically?
Yes. Comma, semicolon, tab and pipe-separated files are detected for you, and you can override the choice. Quoted fields, embedded commas and line breaks inside quotes are handled correctly.
How are numbers and booleans handled?
With type detection on, values like 42, 3.14, true, false and null become real JSON types. Values with leading zeros (such as 007 or ZIP codes) and very long digit strings stay text so identifiers are never altered.
Can I get an array of arrays instead of objects?
Yes. Choose "Array of arrays" for a compact matrix, "Keyed by first column" for a lookup object, or "JSON Lines" for one record per line.
Is my file uploaded?
No. Parsing and conversion happen in your browser. Nothing leaves your device.