CSV Validator
Check a CSV or TSV against its own header row: every ragged row, blank cell, and blank or repeated column name, listed by line number.
You can also drop a .csv, .tsv or .txt file onto this box.
Rows that don't match the header
CSV Validator scans your CSV or TSV for rows that do not line up with the header. It parses the file using RFC 4180 rules, so quoted fields containing commas, escaped quotes and line breaks are counted correctly, then compares the column count of every row to the header row. Short rows with missing columns, long rows with extra columns, and blank required cells are all listed with the exact line number so you can jump straight to the problem. The header row is checked too: a column with no name is reported, and so is one with the same name as an earlier column, naming both. Under the verdict, pass or fail, one line gives the data rows, the columns, how many rows are fine and how many have a problem, and the delimiter the file was read with; blank lines are skipped and listed by line number rather than counted as problems. A file can also be dropped onto the box.
The defaults are strict, and the options loosen them. Allow empty values turns the blank-cell check off for a file with optional columns, while ragged rows, header names and quotes are still checked. Untick First row is a header for a headerless extract, and every row is measured against the width most rows have. Quote character and Escape follow a file that quotes with an apostrophe or escapes a quote with a backslash. Flag whitespace around values, off by default, also reports a value with whitespace at its start or end, and one that is only whitespace.
Why ragged rows matter
A single row with the wrong number of columns can break an import, shift every value into the wrong field, or make a database load fail halfway through. Checking a file before you upload it can prevent silent data corruption. Everything runs locally in your browser, so even confidential exports never leave your device.
Frequently asked questions
What counts as an invalid row?
A row is flagged when its number of columns does not match the header row, either too few for a short row or too many for a long row, or when it has the right number of columns but one of them is left blank (unless Allow empty values is ticked). The header row itself is flagged when a column has no name or repeats an earlier one. Each problem is reported with the line number where it occurs.
Does it handle quoted fields with commas and line breaks?
Yes. The parser follows RFC 4180, so a comma or newline inside a double-quoted field is treated as part of the value, not as a new column or row. Escaped double quotes are handled too, and the reported line numbers still point at the real line in your file. A quote RFC 4180 does not allow is reported with its line and character — one inside a value that is not quoted (an inch mark, 27"), a quoted value that starts after a space, or a quote that is never closed — because programs that import CSV read those in different ways.
Can it check a file with optional columns, no header row, or single quotes?
Yes. Tick Allow empty values and a blank cell stops counting as a problem, while ragged rows, header names and quotes are still checked. Untick First row is a header and every row is data, measured against the width most rows have, so a headerless extract whose first line is the short one gets that one line reported. Quote character reads a file quoted with single quotes, and Escape reads a quote escaped with a backslash instead of doubled. Each option starts at its strict default, so a verdict changes only when you change one.
Does it report whitespace, blank lines, or a summary of the file?
Yes. Flag whitespace around values, off by default so no verdict changes unasked, reports a value with whitespace at its start, its end or both — header names included — and a value that is only whitespace, which counts as blank and so passes once Allow empty values is on. Blank lines are skipped, not counted as problems, and listed under the verdict by line number. Under the verdict, pass or fail, one line gives the data rows, the columns, how many rows are fine and how many have a problem, and the delimiter the file was read with.
What if the file has more problems than the page lists?
The page lists the first problems and rows and then says how many more there are, so a very large file cannot bury the page in thousands of lines. The Copy and Download buttons under the list are not cut short: they carry every problem in the file, one per line, and the download is saved as csv-validator-issues.txt.