CSV to JSON Converter (and Back)
Turn spreadsheet exports into JSON arrays of objects, or flatten JSON back into CSV for Excel and Google Sheets. Useful for seeding databases, feeding APIs from spreadsheets and inspecting exports without writing a script.
How to use
- Paste CSV (with a header row) or a JSON array into the input.
- Pick the direction: CSV to JSON or JSON to CSV.
- Adjust the delimiter if your file uses semicolons or tabs.
- Convert and copy or download the result.
CSV and JSON sit at opposite ends of the data-interchange spectrum: CSV is flat, compact and understood by every spreadsheet ever made. JSON is nested, typed and the native tongue of web APIs. Converting between them is routine, until the edge cases bite.
CSV's edge cases are almost all quoting. RFC 4180 says fields containing commas, quotes or newlines must be wrapped in double quotes, and embedded quotes are doubled ("" not \"). A naive split-on-comma parser corrupts any address field or product description with a comma in it. Regional variations add more fun: Excel in many European and some Indian locales exports with semicolons because the comma is the decimal separator, and Windows line endings (CRLF) can leave stray \r characters on the last column.
Going the other direction, JSON to CSV forces you to answer a structural question: what happens to nested objects and arrays? The usual answers are dot-notation flattening (user.address.city becomes a column) or JSON-stringifying the nested value into a single cell. Type information also degrades, CSV has no booleans or nulls, so true becomes the string "true" and you must decide how to represent missing values.
This converter treats the first CSV row as headers, produces an array of objects keyed by column name, respects RFC 4180 quoting in both directions, and infers numbers and booleans where unambiguous. Data is converted in-memory on the server and never retained for anonymous users.
Examples
Input: name,age,city\nAsha,29,Pune\nRahul,34,Delhi
Output: [{"name": "Asha", "age": 29, "city": "Pune"}, {"name": "Rahul", "age": 34, "city": "Delhi"}]
Input: [{"sku": "A-1", "price": 499.0}, {"sku": "B-2", "price": 899.5}]
Output: sku,price\nA-1,499.0\nB-2,899.5
Input: product,desc\nCable,"USB-C, 1m braided"
Output: [{"product": "Cable", "desc": "USB-C, 1m braided"}]
Frequently asked questions
How are commas inside values handled?
Per RFC 4180: fields containing commas, quotes or line breaks are enclosed in double quotes, and the parser respects that on the way in. "USB-C, 1m" stays one field, not two.
What happens to nested JSON when converting to CSV?
Nested objects are flattened using dot notation (user.city becomes a column) and arrays are serialized as JSON strings inside the cell, since CSV itself has no concept of nesting.
Are numbers kept as numbers?
When converting CSV to JSON, values that parse cleanly as numbers or booleans are typed accordingly. Everything else stays a string. Leading-zero values like phone numbers and PIN codes are kept as strings to avoid data loss.
Can I use a semicolon or tab delimiter?
Yes, select the delimiter before converting. Semicolon-separated files are common from Excel in locales that use the comma as a decimal mark.
Related tools
Velona is India's INR-native AI API gateway with 300+ models, UPI top-up from ₹10, no foreign card needed. These tools are free forever.