CSV Validator

CSV Validator

File loaded:

A CSV that opens fine in a spreadsheet can still fail in a database import or an API upload. This validator reads the file the way RFC 4180 describes it and lists every structural problem with its line number: quotes that never close, rows with the wrong number of columns, empty or repeated header names, a byte order mark at the start and delimiters left at the end of a row. Paste the text or choose a file, pick the delimiter (or let the tool detect it) and read the report.

How to validate a CSV file

  1. 1

    Paste or upload the CSV

    Paste the text into the box, or choose a .csv, .tsv or .txt file. Files up to 1,000,000 characters are accepted.

  2. 2

    Choose the delimiter and header row

    Leave the delimiter on automatic detection or force a comma, semicolon, tab or pipe. Say whether the first row holds column names.

  3. 3

    Read the report

    Each issue is listed with its line number and a plain description, marked as an error or a warning. Copy the report to share it.

  4. 4

    Fix and check again

    Correct the lines in your editor, start over and paste the file again until the report says no issues were found.

What the validator checks

RFC 4180 is the closest thing CSV has to a standard. It says that records are separated by line breaks, that fields containing a delimiter, a quote or a line break must be wrapped in double quotes, and that a quote inside a quoted field is written twice (""). The validator applies those rules to your text and then adds a few checks that matter in practice.

Checks and how they are reported

Check Severity What triggers it
Unbalanced quote Error A quoted field opens and the file ends before it closes. The line shown is where the quote opened.
Quote inside an unquoted field Error A " in the middle of a field that does not start with a quote, such as 5" pipe.
Text after a closing quote Error Something other than a delimiter or line break follows a closing quote, such as "abc"def.
Column count Error A row has more or fewer fields than the first row.
Empty header name Error A column name in the header row is blank.
Duplicate header name Error Two columns share a name once spaces and letter case are ignored (Name and name).
Byte order mark Warning The file begins with the invisible U+FEFF character.
Trailing delimiter Warning A row ends with a delimiter, so it has one empty extra column.
Blank line Warning An empty line between records.

Delimiters

The automatic mode looks at the first 25 non-empty lines and picks the comma, semicolon, tab or pipe that splits them into the same number of fields most often. Delimiters inside quoted fields are ignored, so "Smith, J" does not count as two columns. If two candidates tie, the comma wins. Semicolon-separated files are common in locales where the comma is the decimal separator, so choose the delimiter yourself when a file mixes both.

Line numbers

Line numbers count physical lines in the text you provided, starting at 1. A quoted field that contains line breaks spans several physical lines; a problem in that record is reported on the line where the record starts.

Common causes of CSV errors

  • A spreadsheet export that adds a BOM, which some importers read as part of the first column name.
  • A free-text column with commas or quotes that was not quoted by the exporting script.
  • Joining files with different numbers of columns.
  • A trailing comma added by a script that writes every value followed by a delimiter.

Frequently Asked Questions

No. If the row has the same number of fields as the first row, an empty last value is plain data. The validator only warns about a trailing delimiter when it adds one field more than the first row has, or when the header row itself ends with a delimiter.

Once a quoted field never closes, everything after it is read as part of that field, so the later rows cannot be compared reliably. Fix the quote on the reported line and validate again to see what comes next.

No. It checks the structure of the file: quoting, delimiters, column counts, header names, the byte order mark and blank lines. It does not check whether a value is a valid number, date or email, and it reads the text as UTF-8.

No. The text you paste or the file you choose is read and checked in your browser. It is not sent to our servers or added to the page link. Between steps it is kept in your browser tab only, and starting over clears it. Only the delimiter and header choices appear in the link.

Related Tools

Tool available in other languages