CSV ⇄ JSON Converter
How it works
Paste your CSV on top and the JSON appears below as you type, or flip the direction and turn a JSON array back into CSV. The conversion runs entirely in your browser, so nothing is uploaded and the only size ceiling is your own memory.
The parser follows RFC 4180, the actual CSV standard, which means the hard cases work: fields wrapped in quotes, commas and line breaks inside quoted fields, doubled quotes (`""`) as escapes, and CRLF line endings from Windows and Excel exports. The delimiter is auto-detected (comma, semicolon or tab) and you can override it manually. Semicolon is what Excel produces on most European locales, Italy included.
With 'First row is header' on, each CSV row becomes a JSON object keyed by the header names, and values are typed: `36` becomes a number, `true` a boolean, empty cells become `null`. Values with leading zeros (postal codes, phone numbers) deliberately stay strings so `00187` doesn't turn into `187`. Turn the header option off to get plain arrays instead.
Going the other way, paste a JSON array of objects and the tool builds the header from the union of all keys (in first-seen order), fills the gaps with empty cells, and quotes any field containing the delimiter, quotes or newlines, so the output opens cleanly in Excel, Google Sheets or any importer. If you would rather fix the rows before converting them, the CSV Editor on this site opens the same files in a spreadsheet grid.
Frequently Asked Questions
Does it handle semicolon-separated CSV from Excel?
- Yes. Excel saves 'CSV' with semicolons on locales that use the comma as decimal separator (Italy, Germany, France and others). The auto-detect looks at the first line and picks comma, semicolon or tab, and you can force a delimiter from the dropdown.
How are values typed in the JSON output?
- Numeric strings become JSON numbers, true/false become booleans, and empty cells become null. Values with leading zeros (like the postal code 00187) stay strings on purpose, so no data is silently corrupted. Everything else stays a string.
Does it handle commas and line breaks inside a field?
- Yes, as long as the field is quoted, which is how every spreadsheet exports it: "Rome, Italy" parses as one field, and a quoted field can even contain line breaks. Literal double quotes are escaped by doubling them ("") per RFC 4180.
What JSON shapes can be converted to CSV?
- An array of flat objects (the header is built from the union of all keys) or an array of arrays (no header row). Nested objects and arrays inside a value are out of scope: flatten them first, since CSV has no standard way to represent nesting.
Is there a file size limit, and is my data uploaded?
- There is no hard limit; the practical ceiling is your browser's memory, and tens of megabytes are fine. Nothing is uploaded anywhere: the conversion is plain JavaScript running in the tab, which you can verify from the empty Network panel in DevTools. Safe for customer data and exports you would not email around.
Can I convert Excel files (.xlsx) directly?
- Not directly. Export the sheet as CSV first (File → Save as → CSV), then paste or open it here. The auto-detect handles the semicolon-separated format Excel produces on European locales.