FileExamples
CSV.csv · Invalid

CSV with Inconsistent Columns

Download a free CSV file where rows have different numbers of columns. The header defines 5 fields, but some data rows have 4, 6, or 7 fields. This is one of the most common data quality issues in CSV files from legacy systems, manual data entry, and spreadsheet exports with merged cells. Test how your parser handles column count mismatches.

What Is Broken

The header row defines 5 columns (id, name, email, age, city). Some data rows have only 4 fields (missing city), others have 6 fields (extra column), and some have 7. This creates ambiguity about which field maps to which column.

Broken Example

id,name,email,age,city
1,Alice,alice@example.com,29,New York
2,Bob,bob@example.com,34
3,Carol,carol@example.com,41,San Francisco,USA,CA
4,Dave,dave@example.com,28,London
5,Eve,eve@example.com

Why It Matters

Inconsistent column counts cause silent data corruption when values shift to wrong columns. A parser that doesn't validate row length might map 'age' to the 'city' column without warning, leading to incorrect data downstream.

Expected Parser / Validator Behavior

Strict parsers should reject or flag rows with wrong column counts. Lenient parsers should pad short rows with nulls and truncate long rows, ideally with warnings. Data quality tools should report the exact row numbers with issues.

Related Invalid Files

Related Validators & Tools

Frequently Asked Questions

How do I detect inconsistent columns?

Count the delimiters in each row and compare against the header. Our CSV Validator tool does this automatically and reports exact row numbers.

Should I reject the entire file?

It depends on your use case. For data imports, flag the problematic rows and let the user fix them. For automated pipelines, log warnings and use null-padding or row skipping.