TSV vs CSV: Which Format Should You Use?
CSV and TSV are the two workhorses of plain-text data — and they’re almost identical. Both store tables as text, one row per line, with a delimiter character between columns. CSV uses a comma; TSV uses a tab. That one-character difference creates a surprisingly real tradeoff.
Side by Side
CSV:
name,role,city
Ada Lovelace,Analyst,"London, UK"
Grace Hopper,Engineer,Arlington
TSV:
name role city
Ada Lovelace Analyst London, UK
Grace Hopper Engineer Arlington
Notice the CSV needed quotes around "London, UK" — the comma inside the data collides with the comma delimiter. The TSV didn’t care. That’s the whole story in miniature.
Where CSV Wins
- Universal compatibility. Excel, Google Sheets, databases, and virtually every data tool default to CSV. If you’re handing a file to someone else, CSV is the safest bet.
- Numeric data. Prices, measurements, IDs — data without commas parses cleanly and compactly.
- Smaller files. One comma per separator vs. one tab — negligible per cell, but it adds up over millions of rows.
Where TSV Wins
- Text-heavy data. Product descriptions, addresses, user comments — real text is full of commas and occasional quotes, and TSV sidesteps the escaping mess.
- Simpler parsing. A naive
split("\t")handles most TSV correctly; CSV requires a real parser to handle quoted commas and escaped quotes. If you’re writing quick scripts, TSV saves bugs. - Readability in editors. Tabs create natural column alignment in many text editors, making TSV easier to eyeball than comma-dense CSV.
The Escaping Problem, Explained
CSV’s weakness is that its delimiter is common in data. The standard fix is quoting:
note
"He said, ""hello,"" then left"
That nested-quote escaping is correct CSV — and it’s also the #1 source of broken imports. TSV’s tab character almost never appears in real data, so this entire category of problem simply doesn’t exist. (Edge case: TSV breaks if your data contains tabs or newlines — rare, but then you need quoting too.)
Who Actually Uses TSV?
- Bioinformatics and research — TSV is the default in genomics pipelines and many academic datasets
- Spreadsheet copy-paste — when you copy cells from Excel/Sheets and paste into a text editor, you get TSV (tabs separate the cells)
- Database exports — many database CLIs export tab-delimited by default
- Log processing — tab-delimited logs are trivial to
awkandcut
Converting Between Formats
Need to switch? The conversion is mechanical — but doing it by hand in a spreadsheet is error-prone. Our free TSV to JSON converter turns tab-separated data into clean JSON objects right in your browser (handy when feeding data to APIs or JavaScript), and most spreadsheet apps can re-export in either format via Save As.
Quick manual route in Google Sheets: File → Download → choose “Comma-separated values” or “Tab-separated values.” Done.
TSV in the Wild: Where You’ll Actually Meet It
You may have used TSV without knowing it. Copy a range of cells from Excel or Google Sheets and paste it into a plain text editor — what lands in the editor is TSV: tabs between columns, newlines between rows. Paste it back into a spreadsheet and the grid reconstructs perfectly. That round-trip is the most common TSV encounter in office life.
Beyond the clipboard, TSV shows up in:
- Bioinformatics — gene expression tables, variant call files, and most genomics pipelines default to tab-delimited
- Database CLIs —
psql,mysql, andsqlite3all have tab-delimited output modes that pipe cleanly intoawkandcut - Translation workflows — CAT tools and translation memories often exchange tab-delimited glossaries
- Web analytics exports — several ad platforms offer TSV alongside CSV for bulk reports
Common Gotchas (Both Formats)
- Byte-order marks. Some Windows tools prepend an invisible BOM character to the file, which can corrupt the first column header (
"name"≠"name"). If your first column misbehaves, check for a BOM. - Trailing delimiters. A line ending in a comma or tab creates a phantom empty column. Harmless until your parser counts columns strictly — then everything breaks.
- Inconsistent quoting in CSV. The #1 real-world CSV bug: a file where some fields are quoted and others aren’t, with stray quotes inside unquoted fields. When in doubt, run the file through a validator before importing.
- Newlines inside fields. Both formats allow quoted/escaped multiline fields, and both will confuse naive line-by-line readers. If your row counts look wrong, this is usually why.
- Tabs inside TSV data. Rare, but copy-pasted content can contain literal tabs. A quick find-and-replace of tabs inside fields (or quoting those fields) fixes it.
Which Should You Learn First?
CSV — because it’s the default everywhere and every tutorial, tool, and Stack Overflow answer assumes it. Learn CSV’s quoting rules properly (they’re the source of 90% of CSV pain), and you’ll handle TSV trivially since it’s the same idea with a friendlier delimiter.
Then reach for TSV whenever you’re in charge of the format choice and the data contains commas — your future self, debugging a parser at midnight, will thank you.
The Decision in One Paragraph
Use CSV when compatibility matters most — sharing files, importing into tools, or working with numeric data. Use TSV when your data is text-heavy, when you’re writing parsing scripts, or when commas in the data keep breaking your CSV imports. When in doubt, CSV is the safer default; when commas cause pain, TSV is the fix.
Frequently Asked Questions
What is the difference between TSV and CSV?
CSV separates values with commas; TSV separates them with tabs. That’s the entire structural difference — but it matters because commas appear inside real data far more often than tabs do, which makes TSV simpler and more robust for messy text.
Is TSV better than CSV?
For data containing commas, quotes, or multiline text, yes — TSV avoids most escaping headaches. CSV is better when you need maximum compatibility (Excel, Google Sheets, and most tools default to CSV) or when your data is mostly numbers.
Can Excel open TSV files?
Yes. Rename the file to .txt and use Data → From Text, or just open it — Excel’s text import wizard lets you pick “tab” as the delimiter. Google Sheets imports TSV via File → Import with “Tab” selected as the separator.
How do I convert TSV to JSON?
Use a converter: paste or upload your TSV, and it outputs JSON objects using the first row as keys. Our free TSV to JSON converter does this entirely in your browser with no uploads.