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
In Excel use Data > From Text/CSV and pick Tab as the delimiter, or open it in LibreOffice Calc. Notepad++ shows the raw text.
Open it in Numbers, Excel or LibreOffice Calc. For a quick look in Terminal, use column -t -s $'\t' data.tsv | less -S.
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