Validate a CSV file

Check CSV syntax, row widths, and delimiter consistency before an import.

freeworks offlinenothing uploaded
ToolCSV Validator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Every record is parsed without assuming headers, parser errors are collected, and each row’s field count is compared with the first row. Header mode subtracts the first record from the reported data count.

  • Header mode matches common labelled exports.
  • The parser can infer a delimiter when one is not supplied.

Worked example

Validate a well-formed employee CSV
Check a 3-column, 2-row CSV for structural validity and column consistency
Input
											name,age,city
Alice,30,Portland
Bob,25,Seattle
										
Output
												Valid: yes
Errors: none
Row count: 2
Column count: 3
Has consistent columns: yes
											

When to use this

ETL gates reject malformed uploads, spreadsheet forms check rectangular rows, and fixtures validate exporters.

Edge cases

  • A quoted comma counts as one field while an unquoted comma adds a field.
  • A missing cell creates a row-width mismatch against the first record.
  • An unterminated quoted field is reported as an error rather than repaired.

References