Documents

A CSV fails on structure long before it fails on content.

Most broken imports are boring: one row with an extra comma, a header cell nobody named, a date written two ways. All of it is visible before the file reaches the loader.

Why generated CSVs break

A model asked for a dataset produces plausible rows. It does not know your column contract, so an address containing a comma arrives unquoted, and the row silently gains a field.

The second failure is truncation. Long generations stop mid-row, which produces a final line with fewer columns than the header and no error until import time.

The third is drift within a file: dates formatted per row, a currency symbol appearing halfway down, a numeric column with a stray unit in one cell.

What a structural check finds

Parsing the file as a table exposes the mechanical defects immediately, without any knowledge of what the data means.

  • Rows whose column count differs from the header, usually the truncation or unquoted-comma signature.
  • Unnamed columns, which appear when a header cell is empty or trailing commas are present.
  • Empty cells, counted per column so a sparse column is obvious rather than buried.
  • Header and delimiter consistency, including semicolon-separated files saved with a .csv extension.

Type drift and the columns that matter

Structural checks do not know that a column is meant to be a date. That requires a schema: column names, types, required fields and value ranges.

Where the schema matters, validate against it explicitly. A date column accepting three formats will load in a spreadsheet and fail in a database, and the failure appears in production rather than in review.

Prioritise the columns that join. An identifier with a leading zero lost to spreadsheet coercion is the classic, and it is invisible until the import matches nothing.

Quoting, encodings and the invisible defects

Commas inside text need quoting, quotes inside text need doubling, and line breaks inside a field need the whole field quoted. Each of those is a parse failure waiting to happen.

Encoding is the other silent one. A UTF-8 file opened as Latin-1 produces mojibake in names and addresses, which is a data quality incident rather than a display quirk.

Check for a byte-order mark at the start, which breaks the first header name in surprising ways on some loaders.

What no CSV check can tell you

It cannot tell you whether the data is correct, representative or current. A structurally perfect file can encode a fabricated dataset, which is exactly the risk with generated tables.

It cannot tell you whether the aggregation is right. Totals, deduplication and unit consistency are questions about the domain.

And it cannot tell you whether publishing the file is lawful. A clean CSV of personal data is still personal data.

A workflow for a file you did not write

Validate the structure first, and fix the ragged rows before anything else, since every downstream count depends on the parse being right.

Then check the join column against a known-good list, and the date column for a single format. Those two checks catch most real import failures.

Then sample ten rows and read them. If the data is generated, the sample is where invented names, impossible dates and duplicated addresses become obvious.

What this covers

  • Column count per row

    Ragged rows caught, which is the truncation and unquoted-comma signature.

  • Named headers

    No empty header cells and no trailing delimiter creating a phantom column.

  • Empty cells by column

    Sparsity reported per column rather than as a total.

  • Format consistency

    One date format, one number format, no mixed units within a column.

  • Join column intact

    Identifiers preserved as text, with leading zeros and lengths checked.

Questions this page usually raises

What is the most common CSV defect?
Rows with the wrong number of columns, almost always caused by an unquoted comma or a truncated generation. It parses in a spreadsheet and breaks in a loader.
Can a checker validate types?
Only against a schema you supply, because the file itself does not say a column is a date. Structural checks catch shape; type validation needs the contract.
Can it find fabricated data?
No. It reports structure. Sameness across rows, impossible dates and repeated addresses are things a person spots by reading a sample.
Does validating a CSV upload it?
No. The file is parsed in the browser, so customer lists and financial extracts stay on your device.
How large a file can be checked?
Up to the limit shown in the console. Past that, split the file by the same logic you would use to load it.

CSV validation tool

Run the checks, then decide who has to sign it.

The automated pass is free, needs no account and uploads nothing. Escalate to a named reviewer only where being wrong is expensive.