Developer · Validator

CSV validator.

Paste CSV or open a local file and check its structure against RFC 4180 before you import it. Everything runs in your browser; the file is never uploaded.

Advertisement

Input

Read in your browser. UTF-8 and UTF-16 byte order marks are detected.

Result

Paste CSV or open a file, then press Validate.

What is checked, and against what

The rules come from RFC 4180, section 2. Field count: every line should contain the same number of fields (item 4), so a row with more or fewer fields than the header is reported as ragged. Quotes: a field containing a comma, a double quote or a line break should be wrapped in double quotes (item 6); inside a quoted field a double quote is written as two (item 7); an unquoted field may not contain a double quote at all (item 5). An opening quote with no closing quote is reported as an unclosed quote. Line endings: the last record may or may not be followed by a line break.

Beyond the RFC. The RFC defines the comma only. Semicolon, tab and pipe files are common variants, so this page detects them by testing each candidate against the first 50 records (quote-aware) and choosing the one that gives the most consistent field count; you can also force a delimiter. The byte order mark, replacement-character, NUL, blank-line, mixed line-ending, duplicate-header and column type checks are practical import warnings, not RFC rules. Column types are guesses from the values (integer, decimal, boolean, ISO 8601 date or datetime, text, mixed) and numbers with leading zeros such as 007 are kept as text on purpose.

Sources: RFC 4180, Common Format and MIME Type for CSV Files (Y. Shafranovich, October 2005), rfc-editor.org.

Frequently asked questions

Will a file that passes here import into my app?

Not necessarily. This page checks structure only. Required columns, allowed values, date formats, size limits and encoding rules belong to the importing app, and this tool does not know them.

Why is my semicolon-separated file flagged as info?

RFC 4180 only defines comma-separated values. Many European spreadsheet exports use semicolons. The file is checked as-is with that delimiter and the note tells you not every importer accepts it.

What is wrong with a byte order mark?

Nothing in the RFC forbids or mentions it, but some importers treat those three bytes as part of the first header name, so a column called "id" is no longer found. Re-save as UTF-8 without BOM if that happens.

Is my file uploaded?

No. Parsing happens in your browser tab. Nothing is stored or sent anywhere.

Structure check only

This tool checks CSV structure against RFC 4180. It does not check the data against any importing application's rules, and a clean result does not guarantee an import will succeed.

Advertisement
Advertisement
Listening…