CSV vs TSV: delimiters and format differences

CSV and TSV store the same rows and columns but use different separators and quoting rules. Learn how they differ, when to use each, and how to convert safely.

CSV and TSV are both plain-text formats for tabular data. Each line is a row, and a separator character divides the row into fields. The visible difference is the separator: CSV uses a comma and TSV uses a tab. The practical difference is how each format handles data that contains that separator. CSV relies on quoting. TSV usually forbids tabs inside fields or depends on a tool-specific escape convention. That one design choice determines which format is easier to read, which is safer to convert, and which is more likely to break when you move it between applications.

What changes when you switch between CSV and TSV

Converting between CSV and TSV is a structural change. It is not a visual effect. Text tools that reverse character order, mirror text visually, substitute look-alike Unicode characters, or change presentation with CSS alter how text looks or which characters are stored. A CSV-to-TSV conversion does none of that. The characters inside each field should stay exactly the same. Only three things change: the separator between fields, the quoting around fields, and the escaping of special characters. If any field content changes, the conversion has damaged the data.

CSV, as described in RFC 4180, separates fields with commas. A field that contains a comma, a double quote, or a line break must be wrapped in double quotes. A double quote inside a quoted field is written twice. Many real-world CSV files depart from this description, for example by using a different line-ending style or a semicolon separator. Treat RFC 4180 as the common reference point, not as a guarantee of what any particular file contains.

TSV separates fields with a single tab character. Its registered media type definition does not allow tabs inside field values and has no quoting mechanism. Some tools extend TSV with backslash escapes such as \t and \n, or accept CSV-style quoting. Those conventions vary by tool, so a TSV file that uses them is only portable to software that follows the same convention.

The following matched input shows the same three rows in both formats. It is illustrative, written to the rules above, and was not produced by running a specific converter.

id,name,note
1,"Smith, Jordan","Said ""ready"" at noon"
2,Lee Kim,No comma here
id	name	note
1	Smith, Jordan	Said "ready" at noon
2	Lee Kim	No comma here

In the CSV version, the comma in Smith, Jordan forces quotes around the field, and the inner quotes are doubled. In the TSV version, neither is needed because a comma is ordinary text there, and the quotes appear as literal characters. If the note had contained a tab or a line break, the CSV version could still hold it inside quotes. Plain TSV could not represent it without an escape convention.

CSV and TSV compared on the same criteria

Criterion | CSV | TSV
Separator | Comma (some locales and tools use a semicolon) | Tab
Field contains the separator | Allowed if the field is quoted | Not allowed in plain TSV; needs a tool-specific escape
Field contains a line break | Allowed if the field is quoted | Not allowed in plain TSV; needs a tool-specific escape
Double quotes in data | Must be doubled inside a quoted field | Usually literal, though some readers treat them as quoting
Readability in a plain text editor | Quotes and doubled quotes add clutter | Usually cleaner, but tabs are invisible and columns may not align
Parsing difficulty | Needs a quote-aware parser | Splitting on tabs works when the data is known to contain no tabs or line breaks
Common reference | RFC 4180 | Registered media type definition for tab-separated values
Round-trip safety | Can represent any text field | Lossless only if data has no tabs or line breaks, or escapes are handled consistently

Which format suits your task

  • Choose CSV when the receiving system expects it, which many import screens, databases, and data services do.
  • Choose CSV when field values may contain free text with tabs, line breaks, or arbitrary punctuation, because quoting can carry all of these.
  • Choose TSV when fields routinely contain commas, such as addresses, names written last-name-first, or prose, and you can confirm they never contain tabs or line breaks.
  • Choose TSV when you or others will read and edit the file by hand, or process it with simple line-and-split scripts, because there is no quoting to manage.
  • Choose TSV when pasting into or out of a spreadsheet grid, since spreadsheet clipboard data is commonly tab-separated. Test the specific applications involved before relying on this.

The tradeoff is robustness versus simplicity. CSV can hold almost any data, but only when every tool in the chain implements quoting correctly. TSV is simpler and less ambiguous for clean data, but it gives you no built-in way to carry a tab or line break inside a field. If you cannot guarantee clean data, CSV with a proper parser is the safer default. If you can guarantee it, TSV is often easier to work with.

Converting without corrupting data

Do not convert by find-and-replace. Replacing every comma with a tab splits any quoted field that contains a comma, and it leaves stray quote characters behind. A correct conversion parses each record according to the source format's rules and then writes it out according to the target format's rules.

  • Use a parser that understands CSV quoting, including quoted line breaks and doubled quotes.
  • Before converting to TSV, check whether any field contains a tab or a line break, and decide whether to reject, escape, or replace those characters. Any replacement is a deliberate change to the data and should be documented.
  • When converting TSV to CSV, find out whether the source used backslash escapes, and decode them before quoting for CSV.
  • Confirm the character encoding. Neither format guarantees one, and a mismatch can garble accented or non-Latin text.
  • Compare row and column counts before and after conversion, and spot-check rows with commas, quotes, or long text.

Will the converted file stay readable and usable

Tab characters do not always survive copy and paste. Some text editors, chat tools, web forms, and code editors convert tabs to spaces or collapse whitespace, which turns TSV into text that no longer splits into columns. Commas survive transfer more reliably, but CSV can still break if a destination strips or alters quote characters. After pasting or uploading, check the destination: confirm that the column count is right and that a row with tricky content still lines up.

Opening either format in a spreadsheet can change values even when the file itself is correct. Spreadsheet software may reinterpret long numbers, values with leading zeros, or date-like strings when it opens a file. That behavior comes from the application, not from the format. If exact values matter, import with columns set to text, or inspect the raw file in a plain text editor.

For people reading the data, a raw delimited file is a poor presentation format. Tabs are invisible and display with varying widths, so TSV columns often look misaligned. CSV quoting adds visual noise. For anyone who needs to read the data, including people using assistive technology, render it as a real table in a spreadsheet or document rather than sharing raw text. This guide makes no claims about how specific screen readers announce raw CSV or TSV, because no test results were provided.

If you use an online converter, your data is sent to that service. Avoid uploading files that contain personal, financial, or confidential information unless you have reviewed how the service handles data. For sensitive files, convert locally with a spreadsheet application, a scripting language's CSV library, or a command-line tool.

Limits of this comparison

This guide describes the formats as commonly defined. It does not evaluate any particular converter, spreadsheet, or platform, and the examples above are illustrative rather than observed output. Because many applications implement their own variations, the reliable way to confirm compatibility is to run a small sample that includes commas, quotes, tabs, line breaks, and non-English characters through your actual workflow, then compare the result field by field.