Count TSV Entries
Count rows, columns, cells, and analyze TSV (Tab-Separated Values) data instantly. Paste or upload TSV files for detailed entry statistics.
About
TSV (Tab-Separated Values) files encode tabular data using the horizontal tab character (U+0009) as a field delimiter and a newline (U+000A) as a record terminator. Miscounting entries in a TSV file leads to silent data truncation during database imports, broken ETL pipelines, and corrupted analytics reports. A stray trailing newline inflates the row count by 1; an inconsistent column count across rows signals corrupted records that most naive parsers ignore. This tool parses raw TSV input, counts total rows, non-empty rows, columns, and individual cells, and flags structural anomalies such as ragged rows where the column count deviates from the header. It assumes the first non-empty row defines the column schema. No data leaves your browser.
Formulas
TSV entry counting relies on deterministic string splitting. The total line count is derived from splitting the input on the normalized newline character:
Non-empty rows are filtered by a non-whitespace test:
The column count is extracted from the header (first non-empty line):
Total cell count across all non-empty rows:
A row is classified as ragged when its field count deviates from the header column count:
Where N = number of non-empty rows, cols = header-derived column count, \t = horizontal tab character (U+0009).
Reference Data
| Metric | Description | Typical Range |
|---|---|---|
| Total Lines | All lines including empty trailing lines | 1 - 106 |
| Non-Empty Rows | Lines with at least one non-whitespace character | 1 - 106 |
| Empty Rows | Lines containing only whitespace or nothing | 0 - 100 |
| Data Rows | Non-empty rows excluding the header row | 0 - 106 |
| Columns (from header) | Tab-delimited fields in the first non-empty row | 1 - 500 |
| Total Cells | Columns × non-empty rows | 1 - 108 |
| Filled Cells | Cells containing at least one non-whitespace character | Varies |
| Empty Cells | Cells that are blank or whitespace-only | Varies |
| Ragged Rows | Rows whose column count ≠ header column count | 0 (ideal) |
| Duplicate Rows | Rows with identical content to a previous row | Varies |
| Max Row Length | Highest number of fields in any single row | 1 - 1000 |
| Min Row Length | Lowest number of fields in any non-empty row | 1 - 1000 |
| Delimiter | TSV uses horizontal tab U+0009 | Fixed |
| Line Ending | LF (\n), CR+LF (\r\n), or CR (\r) | Platform-dependent |
| File Size Limit (browser) | Practical limit for in-memory text processing | < 100 MB |