.tsv

What is a .tsv file?

Tab-Separated Values · Data · IANA-registered convention · 1993

TSV stores a table as plain text with columns separated by tab characters and rows by newlines. It is a close cousin of CSV that avoids the comma-quoting problems that trip CSV up.

Category
Data
Type
Plain text
Is a .tsv file safe to open? Safe. TSV is plain-text data. As with CSV, be cautious opening untrusted files in a spreadsheet, which may interpret leading = as a formula.

What is a .tsv file used for?

Because tabs rarely appear inside data values, TSV often needs no quoting or escaping, which makes it simpler and more predictable than CSV for text that contains commas. Spreadsheets and databases import and export it directly.

It is common in bioinformatics and data science, and is the default clipboard format when you copy cells from a spreadsheet, which is why pasting into a text editor gives you tab-separated columns.

What opens a .tsv file?

The .tsv format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.

Windows

  • Excel
  • VS Code
  • any text editor

macOS

  • Numbers
  • Excel
  • any text editor

Linux

  • LibreOffice Calc
  • VS Code
  • column -t

Open a .tsv file step by step

  1. Confirm the file really is a .tsv. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
  2. On Windows, open it with Excel or VS Code.
  3. On Mac, use Numbers or Excel.
  4. On Linux, try LibreOffice Calc or VS Code.
  5. Still stuck? Convert the .tsv to CSV, which opens more widely.

Why can't I open my .tsv file?

Almost always because no installed app understands TSV. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.

The other possibility is that the file is not really a .tsv at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.

How to convert a .tsv file

You can convert a .tsv file to CSV, JSON, XLSX using a conversion tool or the export menu of an app that opens it.

TSV has no fixed magic number, so there is no signature table on this page. Its bytes alone do not prove the format: identification relies on the extension, the structure of the content and the program that created it. The magic-numbers reference lists the formats that do carry one.

Frequently asked questions

What is a .tsv file?

TSV stores a table as plain text with columns separated by tab characters and rows by newlines. It is a close cousin of CSV that avoids the comma-quoting problems that trip CSV up.

What is the difference between TSV and CSV?

TSV separates columns with tabs, CSV with commas. Tabs seldom appear in values, so TSV usually needs no quoting, making it simpler for messy text.

How do I open a TSV file?

Open it in Excel, Numbers or LibreOffice Calc, which lay it out as a table, or view the raw tabs in any text editor.

Why did my TSV columns misalign?

Usually a value contains a stray tab or a newline, or the file mixes tabs and spaces. Viewing it in a monospaced editor with visible whitespace reveals the culprit.

Comparisons

Related formats

Sources

Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.