Skip to main content

CSV validator

Analyze CSV data to detect structural inconsistencies, irregular columns, and common errors before reusing or importing the file.

  • Clipboard

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Was this tool useful?

How does this tool work?

A CSV that opens in a spreadsheet can still fail a business import: a record may contain one field too few, a column may have no heading, or an open quotation mark may absorb the rest of the document. The CSV validator looks for these structural problems before conversion or upload to another application. It reports total records, data records and columns together with detected issues. This diagnosis does not check the receiving system's business rules, whether addresses work or whether amounts are financially correct.

Reading accounts for quoted cells, delimiters inside those cells, doubled quotation marks and quoted line breaks. A leading UTF-8 BOM is removed. Automatic mode chooses between commas, semicolons, tabs and vertical bars using the first logical record. You can force a delimiter to test an import assumption. An ambiguous detection can make a wide file appear to have one column, so always interpret the status alongside the reported delimiter and your expected table width.

The first record establishes the expected width. Every later record must contain the same number of cells; an empty field after a delimiter still counts as a cell. Short and long records are reported with their actual and expected widths. The reported number counts logical records, which may differ from physical editor lines: a quoted cell spanning three lines still belongs to one record. An unclosed quotation mark is reported separately rather than repaired.

The header option is enabled initially. It checks headings after removing surrounding spaces: a blank title is reported and two identical normalised titles count as duplicates. Letter case remains significant, so Code and code are different headings. With the option disabled, the first record remains data and heading checks are skipped. Validation makes no repairs. It searches for these particular defects rather than certifying exhaustive compliance with every lexical requirement of RFC 4180 or every convention supported by another CSV reader.

How to use this tool

  1. Supply the text that needs checking

    Paste the CSV or import a CSV or TSV file. Leave its quotation marks and delimiters intact: removing them would hide the very structural defects you are trying to diagnose.

  2. Confirm the reading assumptions

    Start with automatic delimiter detection and set the header option to match the real first record. If a wide table is reported as one column, explicitly select the delimiter you expect.

  3. Repair the source and check it again

    Read the issue details on the page and export the numerical summary if needed. Correct the original export, then validate the revised file. The report does not generate a repaired CSV for you.

Use cases

Investigate a rejected import

Find a missing or additional field before looking for data-type problems or date-format requirements in the application that receives the file.

Check a recurring supplier export

Inspect the dimensions and headings of a newly received export, then compare them with the agreed schema before using the file in a processing chain.

Prepare a table conversion

Locate blank or repeated headings before converting the records into JSON objects, whose properties should identify the intended columns without ambiguity.

Examples

A value containing the delimiter

The semicolon inside the quoted name belongs to the cell and does not add a column. With the header option enabled, the engine counts three total records, two data records and two columns. None of the implemented checks reports an issue.

Input

id;name
1;"Home; garden"
2;Workshop

Result

Valid CSV
Rows: 3
Data rows: 2
Columns: 2
Detected delimiter: ;

An incomplete data record

The third record has only one field, whereas the header defines two. The identifier 2 is neither removed nor automatically completed. The issue points you back to the source, where you can determine whether the name is missing or the export was truncated.

Input

id;name
1;Workshop
2

Result

CSV needs fixing
Rows: 3
Data rows: 2
Columns: 2
Detected delimiter: ;
Row 3 contains 1 columns instead of 2.

Tips and best practices

  • A correctly delimited empty cell is not a width error. Check separately whether your application allows that missing value, particularly when the column is supposed to contain a mandatory identifier.
  • The text export contains the dimension and delimiter summary; detailed issues are shown on the page. Do not assume the downloaded report contains repaired records or a replacement data file.
  • Apparently shifted record numbers can result from quoted multiline cells. Locate the affected record with a CSV-aware reader rather than splitting the text at every physical line break.

Sources and references

Frequently asked questions

Will a CSV marked valid be accepted by my application?

Not necessarily. The status means this tool's structural checks found no issue. An importer may still require a particular column order, a fixed heading list, specific date formats or mandatory cell values.

Why can a file containing just one column be valid?

A single-column table is legitimate, but the wrong delimiter can also hide the real columns. Compare the reported width with the expected width and force the appropriate delimiter when automatic detection is ambiguous.

Are headings containing only spaces allowed?

They are reported as blank when the header option is enabled. Surrounding spaces are also ignored when looking for duplicate headings, without changing the source text in the input area.

Does the validator delete malformed records?

No. It describes problems without transforming the CSV. Keep the original, repair the export or the program that generated it, and check the structure again before continuing with other processing.

Related tools

Tools similar or complementary to this one.

Similar tools

Rename one or more CSV columns without changing the row data.

Data & spreadsheetsUse this tool

Merge multiple CSV files into one table while keeping columns aligned consistently.

Data & spreadsheetsFeaturedUse this tool