SmartQueryTools

CSV vs TSV

CSV and TSV are both plain-text tabular formats — the only structural difference is the delimiter character. In practice, that one character determines which format causes fewer problems with your data. Understanding the tradeoff helps you choose the right format before a comma or a tab inside a value ruins an import.

What is CSV?

CSV (Comma-Separated Values) uses a comma as the column delimiter. It is the default export format from databases, SaaS tools, CRMs, spreadsheets, and reporting pipelines worldwide. Because commas appear frequently in natural text — addresses, descriptions, notes — CSV parsers must handle quoting: values that contain commas are wrapped in double quotes.

CSV is defined by RFC 4180, though many real-world CSV files deviate from the standard. The universal adoption of CSV means virtually every tool, library, and language can read it without configuration.

What is TSV?

TSV (Tab-Separated Values) uses a horizontal tab character (\t) as the delimiter. Because tabs almost never appear in user-entered text, TSV files rarely need quoting. This makes TSV simpler to parse and less error-prone when data contains commas, quoted strings, or embedded newlines.

TSV is the preferred export format for bioinformatics tools, some database CLIs (MySQL, PostgreSQL COPY), and data science workflows where field values regularly contain commas. The downside is that tabs are invisible in most text editors, making TSV files harder to inspect manually.

CSV vs TSV: Key Differences

FeatureCSVTSV
DelimiterComma (,)Tab (\t)
Quoting requiredYes — when values contain commasRarely — tabs in values are uncommon
Tool compatibilityUniversalMost tools; some require configuration
Human readabilityEasy to read for short valuesColumns misalign without a tab-aware editor
Problem valuesCommas, newlines in text fieldsTab characters in text fields
Default in ExcelYesSupported but not default
Database COPY exportSupported (specify delimiter)Default in PostgreSQL COPY, MySQL outfile

When to use CSV

  • Sharing data with non-technical users who will open it in Excel or Google Sheets
  • Uploading to any web-based import wizard — CSV is the universal expectation
  • Data contains no commas or embedded newlines in field values
  • Maximum tool compatibility is the priority

When to use TSV

  • Data fields frequently contain commas (addresses, product descriptions, free-text notes)
  • Exporting from a database using native COPY/outfile commands (PostgreSQL, MySQL default to tab)
  • Bioinformatics or genomics pipelines — TSV is the standard in that domain
  • Building a parser yourself and want to avoid quoting complexity

Convert between CSV and TSV

Convert files instantly in your browser — no upload, no account, no server.

More format comparisons