Check the shape of a CSV before it causes trouble
A CSV import can fail even when the file opens and looks almost right. One record may have an extra separator, or a note field may be missing its closing quote. The rows that follow then appear to have a different number of fields. Counting columns in the widest parsed record gives you the file’s maximum width; comparing each data row with the header width can reveal records that need a closer look.
This is useful when a system says a row has too many or too few fields, when you are checking a file from an unfamiliar source, or when a merge seems to have shifted values under the wrong headings. It gives you a quick structural check before you investigate individual cells.
What the column total means
The main count is the number of fields in the widest parsed record, including empty fields created by delimiters. For example, Order ID,Status,Amount has three fields. A record ending in a comma still has an additional empty field, so its field count may be larger than the visible values suggest.
When First row contains column names is selected, the first record is treated as the header. The tool compares data rows with the header’s field count and reports rows with fewer fields and rows with extra fields. Turn the option off for a file with no header; the widest record still determines the column count, and row widths are compared with that width.
Uneven row widths are clues, not automatic errors
A short row may be valid if the format allows missing trailing values, and an extra field may be intentional. The counter reports the difference without changing the data or deciding whether your application accepts it. The preview helps you inspect where values appear, but use the destination’s import rules to decide what should be corrected.
Read the count and inspect the file
- Load a CSV, TSV, or delimited TXT file, or paste the text.
- Set whether the first record contains column names.
- Review the widest field count and any rows that differ from the expected width.
- Inspect the complete table and download a small count report if needed.
Comma, tab, semicolon, and pipe separators are detected. Quoted fields can contain delimiters, escaped quotation marks, and line breaks. Truly empty lines are skipped; rows with separators and empty cells still count. Files up to 50 MB are processed in your browser and are not uploaded to RomitCSV.
Questions about CSV column counts
How does the counter decide how many columns the file has?
It counts fields in the widest parsed record. This includes empty trailing fields created by a delimiter at the end of a row.
Why do some rows show fewer fields than the header?
Those records contain fewer parsed fields than the header row. This may mean values are missing, or the file format may allow omitted trailing fields; check the requirements of the system that will use the file.
What does an extra-field row mean?
The row contains more fields than the header. A misplaced delimiter or an unquoted value containing a delimiter can cause this, though the source may also intentionally have extra fields.
Can I count a file without headings?
Yes. Turn off First row contains column names. The counter then compares data records with the widest record.
Do blank values count as columns?
Yes. Delimiters define field positions even when a field has no value.
Does this tool repair inconsistent rows?
No. It reports field counts and displays the parsed table but does not alter the source data. Use Fix CSV Formatting if you need to repair formatting.
Continue checking the file
Count records with the CSV Row Counter, or open the data in the CSV Table Viewer for a closer look. Browse all CSV tools.