TSV

What is a TSV file?

Like CSV but tab separated, which avoids the comma-inside-a-field problem entirely.

What TSV is

TSV is a plain-text format you can open in any editor. It is used for moving data between programs.

The extension is .tsv, and the full name is Tab-Separated Values. Both matter less than what the file can hold, which is what the rest of this page is about.

Where TSV came from

It dates from 1993. The specification is IANA text/tab-separated-values.

A format that has been readable for that long is a format worth trusting with something you want back in ten years.

The specification is public

Anyone can implement it without asking permission or paying a licence, which is why it turns up in so many programs and why files written twenty years ago still open.

Nothing is thrown away

TSV stores its content exactly. Saving it again changes nothing, so it can be opened, edited and re-saved as often as you like without accumulating damage — which is what makes it a working format rather than a delivery one.

There is nowhere to leave a note

TSV has no comment syntax. Anything explanatory has to live outside the file, which is worth knowing before choosing it for something a human will edit by hand.

What opens TSV

Microsoft Excel, LibreOffice Calc and pandas read it, and so do most programs of the same kind.

If a file will not open, the format is rarely the problem — it is more often that the program predates it. Converting to something older is the reliable way past that, and it is what the rest of this site is for.

Opening it in a browser

No browser reads it.

That is the single most common reason to convert it: not that the format is bad, but that the place you want to show the file cannot read it.

It is a working format

TSV is meant to be opened and changed. Keep the file in this format for as long as the work is going on, and export from it whenever a finished copy is needed.

What goes wrong with it

The recurring complaints: column types are guessed on import rather than stated.

None of these is a reason to avoid the format. They are the things worth knowing before you are surprised by one, which is a different claim and a more useful one.

The facts, in one place

Identifiers and provenance for the TSV format.
Extension.tsv, .tab
Media typetext/tab-separated-values
First published1993
SpecificationIANA text/tab-separated-values

Converting TSV to something else

Converting something else to TSV

Formats worth considering instead of TSV