# TSV to CSV

Convert a TSV file to CSV, quoting the fields that need it rather than just swapping tabs for commas. Free, and nothing is uploaded.

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

## 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: TSV, CSV, semicolon and pipe separated text in. Out with a comma, semicolon, tab or pipe.
- Limits: Rows with a different field count from the header are reported and kept rather than dropped, the same as the other CSV tools here.
- 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

### Why not just replace the tabs with commas?

Because a field containing a comma then breaks the file. Replacing tabs gives a row with more columns than the header, and nothing downstream can tell which comma was data and which was a separator. Parsing and re-writing quotes those fields, which is the whole difference.

### Can I go the other way, from CSV to TSV?

Yes, pick tab as the output. The separator is detected on the way in and chosen on the way out, so any of the four combinations works. Tabs are worth going back to when the data is full of commas and the quoting is making the file hard to read.

### Will Excel open the result properly?

The download carries a byte order mark, so Excel on Windows reads it as UTF-8 rather than as the local code page, which is what turns accented and non-Latin names into mojibake. If Excel still shows one column, pick semicolon, which is what it expects in most of Europe.

### What happens to a field that already has quotes in it?

The quotes are doubled, which is how CSV escapes them, and the field is wrapped. That is done by writing the file properly rather than by string replacement, so a value like 5'10" survives intact instead of ending the field early.

### Are empty columns preserved?

Yes. Two tabs in a row mean an empty field and that stays an empty field, rather than collapsing into one separator. Collapsing is what a naive split does and it shifts every column after it by one.

## Related tools

- [CSV to JSON](https://filetity.com/csv-to-json): Turn a CSV or TSV file into JSON, as an array of objects or as rows.
- [CSV Viewer](https://filetity.com/csv-viewer): Open a CSV file as a readable table, without a spreadsheet app.
