Ffile2fix
Sign in Get started

What is a .tsv file?

A .tsv file stores a table as plain text, with one row per line and columns separated by tab characters. It is common in database and analytics exports, bioinformatics, Google Sheets downloads and anywhere commas appear inside the data.

Key facts

  • MIME type text/tab-separated-values (registered with IANA).
  • The IANA definition has no quoting: fields may not contain tabs or newlines, which makes TSV simpler to parse than CSV.
  • The first line is usually a header row; encoding is ideally UTF-8.
  • Excel's 'Unicode Text (*.txt)' export is tab-delimited UTF-16, a common source of confusion.
  • Same size as the equivalent CSV; often gzipped (.tsv.gz) for large datasets.

How to open a .tsv file

Windows

In Excel use Data > From Text/CSV and pick Tab as the delimiter, or open it in LibreOffice Calc. Notepad++ shows the raw text.

macOS

Open it in Numbers, Excel or LibreOffice Calc. For a quick look in Terminal, use column -t -s $'\t' data.tsv | less -S.

Linux

Open it in LibreOffice Calc, or work in the shell: column -t -s $'\t' data.tsv | less -S to view, cut -f2 data.tsv to extract a column, and awk -F'\t' for filtering.

Common problems and fixes

Everything lands in one column in Excel
Excel did not detect the tab delimiter. Import it via Data > From Text/CSV and choose Tab, or rename it to .txt and use the Text Import Wizard.
Columns shift on some rows
A field contains an embedded tab or line break, or an editor converted tabs to spaces. Clean those values in the source export or switch to a quoted format such as CSV.
Text looks garbled or has spaces between letters
The file is in UTF-16 or a legacy encoding. Re-save it as UTF-8, for example iconv -f UTF-16 -t UTF-8 in.tsv > out.tsv.
Leading zeros or long numbers are changed
Spreadsheet apps auto-convert numeric-looking values. Set those columns to Text in the import dialog before loading the file.

Often converted to or from: CSV, XLSX, JSON, SQL INSERT statements, Markdown table

Frequently asked questions

What is the difference between TSV and CSV?

Only the delimiter and quoting rules: TSV uses tabs and traditionally no quotes, while CSV uses commas and double quotes around fields containing commas. TSV is easier to parse when your data contains commas.

How do I convert TSV to CSV?

Open it in a spreadsheet and save as CSV, or use a converter that handles quoting. A plain tr '\t' ',' breaks any value that already contains a comma.

Can I rename .tsv to .csv?

Renaming does not change the delimiter, so many apps will still show one column. Convert the file instead, or tell the importing tool that the separator is a tab.

See all file types → · Browse error fixes →