Skip to content
100% local

CSV column validator

Check that every row of a CSV or TSV file has the same number of columns as the header.

Input
Output

CSV column validator

Paste delimited text and this tool checks that every row has the same number of fields as the header row. It's the check to run before importing a CSV export into a database or a pipeline that assumes a fixed column count — a stray comma or a missing field can silently shift every column after it, and that bug is painful to trace once it's downstream.

The tool counts the fields in your first row and treats that count as correct. Every following row is compared against it; a mismatched row gets a comment line inserted directly above it in the output, reading something like "# Row 3: expected 3 columns, got 2". No row is ever removed or reordered — the data stays intact, annotated rather than filtered, so you can see exactly where an export went wrong.

Choose the delimiter that matches your file: comma for standard CSV, semicolon for the European variant some spreadsheet tools default to, or tab for TSV. Trim whitespace in fields is on by default, so " Berlin" and "Berlin" count as the same field rather than tripping over a stray space from copying a table. Turn it off to see fields exactly as they appear, whitespace included.

One honest limitation: this is a simple split-based check, not a full CSV parser, so it doesn't handle delimiters inside quoted fields — "Smith, John" with an embedded comma counts as two fields. Treat a flagged row from a file with quoted fields as something to review by eye, not a final verdict. Blank lines are skipped, and rows are numbered from 1 among the rest. Everything runs locally in your browser — the file never leaves your device, which matters for a customer export or anything you shouldn't upload to a random web service.

FAQ

Does this handle quoted fields with commas inside them?
No — it's a simple delimiter split, not a full CSV parser, so a delimiter inside a quoted field (like "Smith, John") is counted as a real field separator. Treat flagged rows from files with quoted fields as something to review by eye.
What happens to blank lines in my input?
Fully blank lines are skipped before counting. The remaining rows are numbered in order starting at 1, so the row numbers in the flags refer to your data rows, not the original line numbers.
Can a mismatch be reported on the header row itself?
The header row's field count becomes the expected value, so it's never flagged against itself. Every row after it, including a header repeated further down the file, is checked against that count.
Does the tool remove or reorder any rows?
No. Every row from your input appears in the output in its original order — mismatched rows get a comment line inserted above them, but nothing is deleted or moved.
Is my text uploaded anywhere?
No — it never leaves your browser; everything runs locally on your device.