Boneyard Tools

TSV versus CSV: which delimiter to choose

Why tab-separated files sidestep the quoting headaches of CSV, where each format shines, and how converting between them keeps data intact.

The quoting problem CSV creates

CSV uses a comma as its separator, but commas also appear inside ordinary values such as addresses, prices, and place names. The format solves this by wrapping any field that contains a comma in double quotes, which then forces a second rule for escaping quotes inside those fields. The result is a surprising amount of hidden complexity for a format that looks simple. A single missing quote can shift every following column and quietly corrupt a table.

Why a tab is a calmer separator

TSV swaps the comma for a tab character, which almost never occurs inside real-world text. Because the delimiter is so rare, most TSV files need no quoting at all, and a field like capital, France can sit in a column untouched with its comma intact. This makes tab-separated data easier to split with basic tools and less prone to the escaping mistakes that plague CSV. The trade-off is that tabs are invisible, so a stray space can masquerade as a delimiter if you are not careful.

How this converter preserves your data

The tool parses the CSV completely before writing any output, so it understands quoted fields rather than blindly replacing commas with tabs. Fields that only needed quotes because of a comma come out clean, while fields that contain a tab, newline, or quote are re-quoted so the file still round-trips. That means converting to TSV and back to CSV returns the same table, with no columns lost or merged.

Choosing a format for your workflow

Reach for CSV when a tool or teammate expects it, since it remains the default export for most spreadsheets and many APIs. Prefer TSV when your data is full of commas, when you paste directly into a spreadsheet, or when you feed a Unix pipeline that splits on tabs. Neither format stores types or formatting, so treat both as a plain, portable snapshot of rows and columns rather than a full document.

Frequently asked questions

Will Excel or Google Sheets open a .tsv file?

Yes. Both recognize the .tsv extension and split on tabs automatically, and pasting tab-separated text straight into a sheet lands each value in its own cell.

Can I convert the TSV back to CSV without losing data?

Yes. Because fields containing special characters are re-quoted on the way out, the tab-separated output parses cleanly and can be turned back into CSV with the same rows and columns.