
Download free sample TSV files instantly — tab-separated data for bioinformatics, data science, linguistics, and general development testing. All generated locally in your browser.
Domain-specific datasets — realistic column names and value ranges for each field
Specific row counts — for benchmarking parsers, testing pagination, and import performance
Special cases — tabs in values, Unicode, missing fields, and mixed types for parser robustness
Build exactly the file you need — dataset, row count, encoding, and blank cell options
| Feature | TSV (Tab-separated) | CSV (Comma-separated) |
|---|---|---|
| Delimiter | Tab character (\t) | Comma (,) |
| Quoting needed | ✓ Rarely — text fields rarely contain tabs | ✗ Often — text fields frequently contain commas |
| Standard in bioinformatics | ✓ Yes — BLAST, BED, GTF, VCF all use tabs | ✗ Uncommon |
| Opens in Excel | ✓ Yes (import wizard) | ✓ Yes (direct open) |
| Pandas read function | read_csv(sep='\t') | read_csv() |
| Unix command-line friendly | ✓ Works with cut, awk, sort | ✗ Requires quoting-aware tools |
| Common extensions | .tsv, .txt, .tab | .csv |
| RFC standard | No formal spec | RFC 4180 |
What is a TSV file and how does it differ from CSV?
A TSV (Tab-Separated Values) file is a plain-text table where each column is separated by a tab character (\t) instead of a comma. Like CSV, each row is a record and the first row is typically a header. The key practical advantage of tabs over commas is that tab characters almost never appear in real-world text data — addresses, product descriptions, and names frequently contain commas, which forces CSV to quote fields. Tab-separated data rarely needs quoting at all, making it simpler to parse with basic string splitting and more reliable with Unix command-line tools like awk, cut, and sort.
Why is TSV the standard format in bioinformatics?
Bioinformatics tools historically operated in Unix environments where tab-separated files work natively with shell pipelines. The major file formats in genomics — BED, GFF/GTF, VCF, SAM/BAM headers, BLAST tabular output, UCSC genome browser tracks — all use tab separation. These conventions predate CSV's widespread use in data science and became entrenched as the field's tools were built around them. Tools like bedtools, samtools, and GATK read and write tab-separated files by default, and R's read.table() defaults to tab separation, reinforcing the convention.
How do I read a TSV file in Python?
With pandas: df = pd.read_csv('sample.tsv', sep='\t'). With the built-in csv module: reader = csv.reader(f, delimiter='\t'). For large files that don't fit in memory, use pd.read_csv('sample.tsv', sep='\t', chunksize=10000) to iterate in chunks. If your file has comment lines starting with # (common in bioinformatics), add comment='#' to the pandas call: pd.read_csv('sample.tsv', sep='\t', comment='#').
How do I open a TSV file in Excel?
Do not double-click a .tsv file — Excel may not recognize the extension. Instead, open Excel and use Data → Get External Data → From Text/CSV (or Get Data → From File → From Text/CSV in newer versions). In the import wizard, set the delimiter to Tab. Alternatively, rename the file to .txt before double-clicking — Windows will trigger the Text Import Wizard, which lets you specify Tab as the delimiter. Files with a .tab extension typically open correctly in Excel without renaming.
What are the comment lines starting with # in bioinformatics TSV files?
Many bioinformatics file formats include metadata in comment lines at the top of the file, prefixed with #. These lines describe the file version, the tool that generated it, the genome reference used, column definitions, or filtering parameters. VCF files use ## for metadata lines and #CHROM for the header row. GTF/GFF files use # for comments. BLAST tabular output uses # BLAST header blocks. Parsers that support the comment='#' option (like pandas) skip these lines automatically; others require preprocessing to strip them before parsing the tab-separated data.
What is FPKM and TPM in gene expression data?
FPKM (Fragments Per Kilobase of transcript per Million mapped reads) and TPM (Transcripts Per Million) are units for measuring gene expression levels from RNA-seq data, normalized to account for differences in gene length and sequencing depth. FPKM was the original standard from tools like Cufflinks. TPM is now preferred because it allows direct comparison between samples — TPM values in each sample always sum to one million, making cross-sample comparison valid. The gene expression TSV samples here use realistic ranges: TPM values typically range from 0 to ~50,000 with most genes having low expression, and log2 fold-change values are centered around 0 with a spread of roughly ±8.
Can I use TSV files with R?
Yes — R's read.table() defaults to tab separation, making TSV files a natural fit. Use df <- read.table("sample.tsv", header=TRUE, sep="\t") or the tidyverse equivalent df <- readr::read_tsv("sample.tsv"). The read_tsv() function from the readr package is generally preferred for modern R workflows because it's faster, handles encoding better, and produces a tibble with correct column types inferred automatically. For bioinformatics specifically, Bioconductor packages like DESeq2 and edgeR accept count matrices as tab-separated files.
