← CSV Repair & Deduper (offline browser tool)

How to tell if a CSV file was truncated or downloaded incompletely

A CSV cut off mid-download can still open without an obvious error — here's how to check the file actually ended the way it should.

Before you work through this by hand: you can check your own CSV free and see which of these problems your file actually has — duplicate rows, near-duplicates, broken quoting, encoding damage. It runs in your browser tab, nothing is uploaded, and there's no signup or email.

Why a truncated file doesn't always look broken

If a download or transfer is interrupted, the resulting CSV file simply stops wherever the interruption happened — often mid-row or mid-field. Depending on exactly where it cuts off, the file can still open in a spreadsheet without any error message, just silently missing however many rows came after the cutoff point.

Quick checks for truncation

Check whether the last line of the file ends with a complete row (the same number of fields as the header) rather than a partial one. tail -c 200 file.csv on the command line shows the last 200 bytes — a truncated file often ends abruptly mid-field, sometimes with an unclosed quote.

Comparing against an expected size or row count

If the source system reports an expected row count or file size (many export tools do), compare it directly: import pandas as pd; df = pd.read_csv('file.csv'); print(len(df)) against the expected count. A shortfall, especially one that isn't a round or expected number, is a strong signal of truncation rather than intentional filtering.

Re-downloading is safer than patching

Unlike most of the fixes in these guides, a genuinely truncated file usually can't be safely repaired — there's no way to recover data that was never written. If truncation is suspected, re-exporting or re-downloading the source file is the reliable fix rather than trying to patch the incomplete one.

Related check

This pairs well with the row-count comparison step in our schema-validation guide — both catch missing data, just from different causes (parsing vs. transfer interruption).

$19 one-time payment. No subscription. If you'd rather skip the manual steps above, CSV Repair & Deduper (offline browser tool) automates the duplicate-finding and review step for you, entirely on your own device.

See CSV Repair & Deduper (offline browser tool) — $19 one-time

See all free guides