CSV Validator
Validate CSV structure — RFC-4180 quoted multi-line fields, delimiter auto-detect (,/;/tab/|), column counts, types, headers, and empty cells.
CSV Validator
This validator parses CSV text or files directly in your browser — nothing is uploaded to a server. It uses a proper RFC 4180 state-machine parser, so quoted fields that contain commas, quotes, or line breaks ("line1\nline2") are handled correctly instead of being mis-split into extra rows. It auto-detects the delimiter (comma, semicolon, tab, or pipe) and lets you override it, then checks for inconsistent column counts, duplicate headers, always-empty columns, and type inconsistencies (e.g. a mostly-numeric column with a stray text value). The per-column table shows inferred type, percentage of empty cells, and unique value count for quick data-quality review.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Finding which row has the wrong number of columns before an import fails.
- Checking a file's header row against what an importer expects.
- Spotting empty cells in a column that must be populated.
- Validating a file produced by another team before relying on it.
- Confirming a file's structure after a manual edit.
Frequently Asked Questions
- What does it actually check?
- Structural consistency first — every row having the same field count as the header — then per-column profiling: inferred type, how many values are empty, and how many are distinct. A ragged row is the error that breaks downstream loaders most often.
- Why does a row count mismatch happen so often?
- Almost always an unquoted comma inside a field. RFC 4180 requires a field containing the delimiter to be quoted, and data exported by hand or by a naive writer frequently is not — which shifts every column after it for that one row only.
- What is the column type inference for?
- Spotting the one bad value. A column reported as text when you expected a number means something non-numeric is in it — the sample's `thirty` in an Age column is exactly that case, and it is far easier to see in a summary than by scrolling the file.
- Does a high null percentage mean the file is broken?
- Not necessarily, but it is worth explaining. An optional field is legitimately sparse; a required one at 40% empty usually means a join went wrong upstream or the export dropped a column's contents. The number is a prompt to check, not a verdict.
- Is there a formal CSV specification to validate against?
- RFC 4180 exists but is informational and widely ignored — it does not mandate an encoding, a line ending, or even the comma. That is why validation here is about internal consistency rather than conformance: there is no single standard to conform to.
Common errors and gotchas
- Treating structural validity as data validity, which is a separate question entirely.
- Assuming a consistent column count means correct columns, when two could be swapped.
- Overlooking embedded newlines in quoted fields, which look like ragged rows.
- Missing a byte-order mark, which attaches invisible characters to the first header name.
- Validating a file a spreadsheet has already reinterpreted, which changes the data before you see it.