CSV vs TSV
Um comparativo detalhado de CSV (Comma-Separated Values) e TSV (Tab-Separated Values) — tamanho de arquivo, qualidade, compatibilidade e qual escolher de acordo com seu fluxo de trabalho.
CSV (Comma-Separated Values)
Spreadsheets & DataCSV is a simple text-based format for tabular data where values are separated by commas. It is the universal interchange format for data between spreadsheet applications, databases, and programming languages.
Sobre os arquivos CSVTSV (Tab-Separated Values)
Spreadsheets & DataTSV uses tabs instead of commas to separate values in tabular data. It avoids quoting issues common in CSV when data contains commas, making it popular for scientific and linguistic data.
Sobre os arquivos TSVComparativo de vantagens
CSV Vantagens
- Universally readable — every spreadsheet, database, and programming language.
- Human-readable in any text editor.
- Stream-friendly — can process terabytes with constant memory.
- Git-friendly — clean diffs of row changes.
- Tiny overhead vs columnar data structures for simple data.
TSV Vantagens
- No quoting needed — tabs in data are astronomically rare.
- Simpler parser than CSV.
- Preferred by databases, bioinformatics, and scientific pipelines.
- Opens cleanly in every spreadsheet app.
- Plain text, grep-friendly, diffable.
Limitações
CSV Limitações
- No standard — quoting, escaping, encoding, and separators vary wildly.
- No type information: 0042 might be an integer, a string, or an error.
- Leading zeros and large numbers often get mangled by Excel auto-conversion.
- Not suitable for hierarchical or binary data.
- Breaks when content contains the delimiter and the parser is naive.
TSV Limitações
- Tabs can be invisibly replaced with spaces by text editors.
- Carriage returns inside fields require escaping conventions.
- Less ubiquitous than CSV in business/consumer workflows.
- No metadata, no schema, no type information.
Especificações técnicas
| Especificação | CSV | TSV |
|---|---|---|
| MIME type | text/csv | text/tab-separated-values |
| Specification | RFC 4180 (informational) | — |
| Typical separator | Comma (;), semicolon, tab, pipe | — |
| Typical encoding | UTF-8, Windows-1252, ISO-8859-1 | — |
| Line endings | LF (Unix), CRLF (Windows) | — |
| Extensions | — | .tsv, .tab |
| Standard | — | IANA registration (1993), IETF RFC unofficial |
| Delimiter | — | Tab (ASCII 9) |
| Encoding | — | UTF-8 (convention) |
Tamanhos típicos de arquivo
CSV
- Contact export (1000 rows) 100–300 KB
- Analytics export (100k rows) 10–100 MB
- Large dataset (1M rows) 100 MB – 1 GB
- Full database dump 1 GB – 100 GB
TSV
- Small data export 1-50 KB
- Typical database dump 1-500 MB
- Genome annotation file 100 MB - 50 GB
Pronto para converter?
Converta entre CSV e TSV online, grátis e sem instalar nada. Upload criptografado, exclusão automática em 60 minutos.
Perguntas frequentes
CSV (Comma-Separated Values) is a plain text format for tabular data where each line represents a row and commas separate column values. It is the universal interchange format for databases, spreadsheets, and data analysis tools.
CSV (Comma-Separated Values) is a plain text formato para tabular data where each line represents a row e commas separate column values. It is the universal interchange formato para databases, spreadsheets, e data analysis ferramentas.
CSV files open in Microsoft Excel, Google Sheets, LibreOffice Calc, Apple Numbers, and any text editor like Notepad or VS Code. Programming languages like Python and R have built-in CSV parsing libraries.
CSV arquivos abrir in Microsoft Excel, Google Sheets, LibreOffice Calc, Apple Numbers, e any text editor like Notepad ou VS Code. Programming languages like Python e R have built-in CSV parsing libraries.
Use CSV for data interchange between systems, database imports/exports, and programmatic processing. Use XLSX when you need formatting, formulas, charts, or multiple sheets that CSV cannot represent.
Use CSV para data interchange between systems, database imports/exports, e programmatic processing. usar XLSX when you need formatoting, formulas, charts, ou multiple sheets that CSV cannot represent.