Glossary Data & Encoding

TSV (tab-separated values)

TSV is a plain-text table format in which each line is a row and the columns are separated by tab characters.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

Because tabs rarely appear inside data, TSV needs less quoting than CSV: a value such as Smith, Jane is written as is. The registered text/tab-separated-values format simply forbids tabs inside fields; tools that need them use their own escapes, such as \t and \n in database export formats. Copying a range of cells from a spreadsheet puts TSV on the clipboard, which is why pasting it back fills the cells correctly. Converters link it with CSV, JSON and Excel.

Why it matters

Tabs are invisible, and many editors silently turn them into spaces, which breaks the columns without any visible change. A value that does contain a tab or line break, such as a pasted address, shifts every following column. Like CSV, TSV carries no types or encoding, so leading zeros and dates can still be reinterpreted when it is opened in a spreadsheet.

Example

With → standing for a tab character:

id→name
007→Smith, Jane

Unix tools treat tab as the default field separator, so cut -f2 people.tsv prints the name column: name, then Smith, Jane.

AdSense Placeholder
Slot: footer_leaderboard