UNEVEN CSV ROWS

CSV Has Different Number of Columns

An uneven-column error means at least one logical CSV record parses to a different number of fields, often because of a missing delimiter, extra delimiter, or broken quote boundary.

Open CSV Checker & Fixer
SHORT ANSWER

Locate the first affected logical record and inspect its separators and quotes against nearby valid records. Repair the delimiter or quote at its real position. Do not automatically append empty cells unless the source contract proves the missing field belongs at the end.

Count parsed fields, not comma characters

A comma inside a correctly quoted address is data, not a separator. A line break inside a quoted note is also data, not a new record. Raw character counts and text-editor line numbers therefore produce false positives. Use a CSV parser that follows quote boundaries and reports logical record numbers.

RFC 4180 says records should contain the same number of fields, and fields containing commas, quotes, or line breaks should be enclosed in double quotes. The W3C guidance makes the same rectangular-table recommendation while acknowledging common LF line endings and other dialect choices.

Trace the first structural break

One missing closing quote can consume several following physical lines. Later records then appear too wide or too narrow even though their own text is valid. Start with the earliest malformed quote or width change, correct it on a copy, and parse again before editing later rows.

Compare the problem record with the header and a neighboring valid record. An extra comma may belong inside a quoted field; a short record may contain an intentional empty final field, a missing middle value, or a truncated export. Those cases require different repairs.

Treat headers as evidence, not truth

Most files use the first record as headings, but some exports prepend a report title, metadata, or blank lines. Duplicate or empty headings can also make an importer complain even when the field count is consistent. Confirm where the actual table begins and what the destination expects.

A trailing delimiter represents an empty final field. Removing it changes the field count; adding one to every short row is correct only if the schema says that final column is optional. A missing value in the middle must be restored at the right position or subsequent cells remain under the wrong headings.

Validate the repaired copy

After a targeted edit, verify that all logical records have the intended width, quotes are balanced, and record counts match the source. Inspect a few rows around each repair in a table preview. Do not use a global comma replacement or delete every quote.

If the source data can be regenerated, fix the exporter or query. A repeatable export rule is safer than hand-repairing the same structural defect every month.

Broken and corrected examples

Missing middle field

BROKEN OR RISKY
id,name,country
19,Ada,GB
20,JP
CORRECT OR SAFER
id,name,country
19,Ada,GB
20,,JP

Only source knowledge can confirm that Name—not Country—is missing from record 20.

Embedded delimiter

BROKEN OR RISKY
31,North, East region,active
CORRECT OR SAFER
31,"North, East region",active

Quoting the complete region value restores the expected three-field record.

How to fix it safely

  1. Open CSV Checker & Fixer and find the earliest malformed quote or uneven logical record.
  2. Compare that record with the header, a valid neighbor, and the source system's schema.
  3. Correct the exact delimiter or quote boundary on a copy; do not pad or truncate ambiguous rows in bulk.
  4. Parse again and verify uniform field counts, balanced quotes, record totals, and representative values.

Common questions and edge cases

Does a trailing comma mean an extra column?

It represents an empty final field. Whether that is valid depends on the expected schema and header width.

Why is the reported row number different from my editor?

A valid quoted field can span physical lines. CSV-aware tools count logical records, while an editor usually counts every line break.

Can I safely delete all quotes?

No. Quotes protect commas, line breaks, and literal quotes inside values. Removing them can turn valid records into uneven ones.