CSVLane

Runs in this tab. Nothing is uploaded. Check it yourself

CSV validation · Test files

What a CSV validator catches: ten broken files

By CSVLane · Published 30 October 2026

To validate a CSV file, load it in CSVLane: rows with the wrong number of cells, broken quotes, and empty or repeated column names are all reported. In our test of ten broken files, it flagged seven as problems and read an eighth correctly. Two faults passed without a warning, so here is the whole table.

The test: one fault per file

Each file contains one fault. “Reported” means a warning or error naming the problem. We tested CSVLane and Python’s csv.reader with strict=True (Python 3.9.6), on 30 October 2026. Rule numbers are from RFC 4180, section 2.

FileFaultRFC 4180CSVLanePython strict
extra-fieldA row has 4 cells, the header 3Rule 4 wants equal countsReported, line 3, and pauses the downloadNot reported
short-rowA row has 2 cells, the header 3Rule 4Reported; padded and marked in the table, no line number in the noticeNot reported
unclosed-quoteA quote that never closesRule 6, 7Reported, line 2, and pauses the downloadError: unexpected end of data
text-after-quote"Rae" OkaforRule 5, 7Reported, line 2, and pauses the downloadError: , expected after "
stray-quoteRae "Ray" Okafor, unquotedRule 5 forbids itNot reported; value kept as writtenNot reported
duplicate-headerTwo columns named nameNot coveredReportedNot reported
empty-headerA column with no nameNot coveredReportedNot reported
wrong-separatorSemicolons, not commasRule 4 says commasRead correctly as semicolon, and named in the file lineReads every row as 1 column, no error
blank-lineAn empty line mid-fileNot covered directlyNot reported as a fault; removed and counted in CleanReturns an empty row, no error
not-utf8Windows-1252 bytesCharset is outside the rulesReported as read in Windows-1252Error: UnicodeDecodeError

Download any file: extra-field, short-row, unclosed-quote, text-after-quote, stray-quote, duplicate-header, empty-header, wrong-separator, blank-line, not-utf8. We did not test other online validators.

The Python column comes from this check, run on each file:

import csv
with open(name, newline="", encoding="utf-8") as f:
    rows = list(csv.reader(f, strict=True))

Seven reported by CSVLane; three by Python strict. Python’s reader checks quotes and leaves row widths to you, so strict=True alone does not validate a table.

What each kind of report looks like

An extra cell is the most serious: the value has no column to go in, so CSVLane pauses the download instead of dropping it silently.

CSVLane with bad-extra-field.csv: an error notice names line 3 and the download button is disabled
The notice names line 3, and the download button is greyed out until the row is fixed. The Review changes tab marks the row in red. Open this example in CSVLane ↗

A quote that never closes is the fault that does the most hidden damage, because everything after it is swallowed into one cell. The whole of lines 2 to 4 ends up in the name column of a single row:

CSVLane with bad-unclosed-quote.csv: a broken quoting error for line 2
Broken quoting at line 2. A reader that does not report this would just show you fewer rows than expected. Open this example in CSVLane ↗

And this is what a miss looks like. By the letter of RFC 4180 an unquoted field cannot contain double quotes, but no warning appears here, and the value is kept as written:

CSVLane with bad-stray-quote.csv: no warning, and the name shows Rae "Ray" Okafor
No warning. Python’s strict reader accepts this file too, but a stricter importer may not. Open this example in CSVLane ↗

What a structure check cannot tell you

All of the above checks whether a file is readable. It does not check whether the data is right. A file can pass every check above and still have a date in a price column.

Duplicate rows are not a structure fault either, so they are not in this table. They are handled by removing duplicate rows.

Where to go next

Sources

  1. RFC 4180: Common Format and MIME Type for CSV Files, read 30 October 2026.
  2. Python documentation: csv module, read 30 October 2026.