Repair TSV Files Online
Repair malformed TSV files directly in your browser. Fix unbalanced quotes, inconsistent column counts, BOM markers, and mixed line endings — no upload required.
How to repair TSV files
- Drop your CSV file. Its raw bytes are read and five checks run straight away: BOM marker, encoding, mixed line endings, inconsistent column count and unbalanced quotes.
- Read the results. Each check has a green, amber or red dot and a short detail, such as how many short and long rows were found in the first 100 rows.
- If any check fails, click Repair File. If every check passes, the tool reports that the file looks clean and there is nothing to repair.
- Compare the Before and After panels, which show the first 20 lines of each version.
- Click Download Repaired File. The file keeps its name with -repaired added before the extension.
Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.
Worked example
A water-testing lab exports sample results from an older instrument. When a test was not run, the export drops the trailing fields instead of leaving them empty. Some lines end in CRLF and others in LF, and the lab's database import rejects the file.
Input (TSV)
sample_id site ph nitrate_mg_l
WS-0141 Kaituna Weir 7.2 1.8
WS-0142 Mill Creek 6.9
WS-0143 Kaituna Weir 7.4 2.1
WS-0144 Rowan BridgeSettings
- Mixed line endings: found CRLF and LF
- Inconsistent column count: header has 4 columns, 2 short rows and 0 long rows in the first 5 rows
- Unbalanced quotes: none found
- Action: Repair File
Result
| sample_id | site | ph | nitrate_mg_l |
|---|---|---|---|
| WS-0141 | Kaituna Weir | 7.2 | 1.8 |
| WS-0142 | Mill Creek | 6.9 | NULL |
| WS-0143 | Kaituna Weir | 7.4 | 2.1 |
| WS-0144 | Rowan Bridge | NULL | NULL |
Every line now ends in LF. The short rows are padded with commas up to the header's four fields, so the WS-0142 line becomes "WS-0142,Mill Creek,6.9," and WS-0144 gets two trailing commas. Any CSV reader loads those empty fields as missing values, as shown above. No row is removed and no existing value is changed.
Frequently Asked Questions
Does Repair File delete any rows?
No. Every line is kept, including blank lines. Only the BOM, the encoding, line endings, unclosed quotes and short rows are changed.
Why does the tool say my file is clean when another program cannot read it?
The column count check covers the first 100 rows, and the Repair File button only appears when a check fails. Problems further down the file and a semicolon or other delimiter are not detected. Try Change Delimiter for semicolon files, and Convert Encoding if the file uses an encoding other than UTF-8 or Windows-1252.
What does the repaired file look like on disk?
It is UTF-8 text with no byte order mark and LF line endings, the Unix convention. Excel, Python, R, databases and the other tools on this site all read LF files. Values and delimiters are unchanged apart from the padding and any closing quotes.
Related Tools
Validate CSV Files Online
Validate CSV file structure in your browser. Check null counts, distinct values, and data types for every column — no upload required.
Trim Whitespace in CSV Files Online
Trim leading and trailing whitespace from all text columns in CSV files, directly in your browser. No upload required.
Deduplicate CSV Files Online
Remove duplicate rows from CSV files instantly in your browser. No upload, no server — 100% private.
Repair CSV Files Online
Repair malformed CSV files directly in your browser. Fix unbalanced quotes, inconsistent column counts, BOM markers, and mixed line endings — no upload required.
TSV Viewer Online
View and inspect TSV files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.
Convert TSV to Parquet Online
Convert TSV files to Parquet format directly in your browser. No upload required — your data never leaves your device.