# CSV to JSON

Convert CSV to JSON, with quoted fields, semicolons and Excel's byte order mark handled. Free, no signup, and the file is never uploaded.

Canonical page: https://filetity.com/csv-to-json

## Capabilities

- Free: Yes, with no watermark and no page limit.
- Account required: No. There is no account system.
- Processed on device: Yes. The file is read by your browser and never uploaded. There is no server to send it to.
- Formats: CSV, TSV and semicolon or pipe separated text in. JSON out, either as an array of objects keyed by the header, or as an array of rows.
- Limits: The whole file is held in memory and rendered, so a few tens of megabytes is comfortable and a hundred megabyte export is not. Rows with more or fewer fields than the header are reported rather than dropped.
- Mobile: Yes, on any modern mobile browser. Large files are limited by the memory the phone gives the browser.
- Offline: Yes, once the page has loaded. The tool keeps working with no network connection.

## Questions

### My CSV opened as one long column. Why?

The file almost certainly uses semicolons, which is what Excel writes in most of Europe and in any locale where the comma is the decimal separator. This page reads the header line to work out the separator before parsing anything, and you can override it if the guess is wrong. A tool that assumes commas gives you one column with the whole row inside it.

### What happens to a row with the wrong number of fields?

It is kept and flagged, not silently dropped and not thrown as an error. A short row is padded with empty values and a long row keeps its extras, and the count of both is shown above the output. Real exports have ragged rows in them, usually where a field contained an unescaped quote, and failing the whole file over one line is not useful.

### Should the JSON be objects or rows?

Objects when the first line is a header and you want records you can address by name, which is what most code wants. Rows when the header is data, when column names repeat, or when the order matters more than the names. The toggle is above the output and switching it does not re-read the file.

### Does it handle commas and line breaks inside a field?

Yes, when they are inside double quotes, which is what RFC 4180 says a CSV writer must do. A field written as "Smith, John" stays one field, a doubled quote inside a quoted field becomes one quote, and a line break inside quotes does not start a new row. This is the part that hand-rolled splitting on commas always gets wrong.

### Is the file uploaded to convert it?

No. The CSV is read by your browser off the disk, parsed in the tab, and the JSON appears next to it. Nothing is posted. Spreadsheets are usually the most sensitive files people convert online, because a CSV export is normally a customer list, a payroll run or a transactions dump.

## Related tools

- [JSON to CSV](https://filetity.com/json-to-csv): Turn a JSON array into a CSV file that opens correctly in a spreadsheet.
- [CSV Viewer](https://filetity.com/csv-viewer): Open a CSV file as a readable table, without a spreadsheet app.
