Skip to content

Free · Browser-local tools

Validate a CSV file

Validate CSV syntax and optional required, type and allowed-value rules. Locate record and column errors in the editor and download the report.

Validate CSV

Start with your CSV

Open your file in the CSV editor with this tool already selected. Preview the result before downloading.

  1. Open or paste CSV and check its original syntax.
  2. Set an expected column count or optional required, type and allowed-value rules.
  3. Review logical record/column diagnostics, jump to cells and download the report.

Free · No signup · File contents stay in your browser.

Try a small example

3 records · 3 columns
Illustrative CSV sample data
idnameamount
1Example one12
2Example two24
3Example three18

This sample has consistent columns and unique headers.

Optional rules can require a name or check that amount is numeric. The report identifies the affected record and column.

Illustrative fictional data. Open the sample to try the tool.

Try checking column values

The schema validation exercise shows how a file with valid CSV syntax can still contain invalid values. Download the schema checks CSV and open it above.

Follow the exercise’s Integer, Date, and Boolean rules to find three issues in record 4, counting the header as record 1.

How to validate csv

  1. 1

    Open or paste CSV and check its original syntax.

  2. 2

    Set an expected column count or optional required, type and allowed-value rules.

  3. 3

    Review logical record/column diagnostics, jump to cells and download the report.

What to expect

Original syntax checks and edited-table rules are distinct. Optional column rules check required values, supported types and allowed values. For an unchanged UTF-8 original up to 8 MiB, preview adding empty trailing fields to short records and download a separate repaired copy. The short-record preview also locates physical source lines; Download short-record report exports every short record with line locations and field counts, without source values. Extra fields and invalid quotes require manual correction and produce no partial short-record report. Record 1 is the header; quoted newlines can span several physical lines within one logical record.

Local files and clear limits

These tools process file contents on your device. The browser workspace accepts files up to 1 GiB and 5 million records, subject to available browser storage and decoded-record limits. This tool's calculations support up to 100,000 records, 2 million cells and 64 MB of text. Download a new copy to keep your result.

Plain answers

Validate CSV questions

What can I do with this validate csv tool?

Original syntax checks and edited-table rules are distinct. Optional column rules check required values, supported types and allowed values. For an unchanged UTF-8 original up to 8 MiB, preview adding empty trailing fields to short records and download a separate repaired copy. The short-record preview also locates physical source lines; Download short-record report exports every short record with line locations and field counts, without source values. Extra fields and invalid quotes require manual correction and produce no partial short-record report. Record 1 is the header; quoted newlines can span several physical lines within one logical record.

Does my CSV leave my device?

File selection, editing and these task operations run in your browser. Optional recipe assistance, when available, sends your goal and only the column metadata or sample values you explicitly include to its configured provider. Your file is not attached automatically; see Privacy for processing details. Manual editing requires no account or file upload. Download a new copy to keep your result; refreshing restores the original input, not unsaved edits.

How do I locate a CSV quote error?

In Inspect original field counts or Repair short records, a strict quote error reports the logical record, physical source line and zero-based original byte offset. Record 1 is the header and source lines start at 1. Quoted line breaks can make one record span several lines: record 3 can begin on source line 4. Byte offsets count the original bytes, including any UTF-8 BOM; a non-ASCII character can occupy more than one byte. An unterminated quoted field reports end of input, with an offset equal to the original file size, rather than guessing where a quote belongs. Work on a separate copy in a text editor, check the indicated location and quoting, then reopen that copy and inspect it again. A quote failure refuses the complete report or repaired copy, even when earlier records were valid. These tasks do not guess a repair or change the original. Invalid UTF-8 and exceeded limits are separate failures without invented quote locations.

Can I repair CSV records with too few fields?

Open Repair short records in the validation tool, preview the complete original input and review the changed-record count before choosing Download repaired copy. The tool adds empty trailing fields to match the authored original header width; it does not invent missing values. The first 12 short records show logical record numbers and physical source lines, counting CR, LF and CRLF correctly even inside quoted fields. Choose Download short-record report for a complete CSV of every short record, its source line range, expected and actual field counts, and empty fields added. The report contains no source values and is limited to 8 MiB. Original bytes, quotes, line endings, headers and values stay intact. It supports the unchanged original UTF-8 file up to 8 MiB, 100,000 data records and 2 million output cells. Extra fields, malformed quotes and other encodings are refused by repair. For a complete numeric report of both short and extra-width records, choose Inspect original field counts, review the missing and extra counts, then Download field-count report. This diagnostic report preserves the original, contains no source values and never enables extra-field repair. It uses the same original UTF-8 and strict quote limits, with at most 4,096 actual fields per record and 2 million admitted cells; malformed or over-budget input publishes no partial report. Edits invalidate preparation; Undo to the exact original state or reopen the original before trying again. Cancel publishes no partial result. The separate copy never edits or saves the open document. For a deliberate field-count copy, first Inspect original field counts, then expand Choose a field count for a separate copy. Enter the intended width yourself and confirm blank trailing fields, including any new header fields. For example, a two-field header with a three-field data record can be copied at width 3 by appending one blank header field. Existing extra fields stay in place; no values, positions or names are inferred. Prepare, review all change counts, then separately Download field-count copy or its complete numeric report. A record wider than your chosen width refuses the whole copy. The selected width is limited to 4,096 fields, 2 million complete output cells including the header, 1 MiB per padded record and 64 MiB output. Changing the width, withdrawing intent or changing the source invalidates the proposal; no automatic download occurs. Installed apps and extensions require their own host support.

Can I reuse validation rules for another CSV?

Open Reusable validation settings in the validation tool to export a separate JSON settings file. Import it, inspect the complete settings and choose Use these settings before running validation. Header names and positions must match exactly; duplicate or blank headers retain their positions. The file contains rules and headers, not table rows. Settings are limited to 1 MiB, with at most 1,000 literal allowed values per rule and 4,096 characters per allowed value. This product settings format is not JSON Schema. Loading it never edits your table. Preview shows the first 1,000 issues with the complete count; Download CSV reruns every check in a cancellable worker, with a 64 MiB report limit and 10-second timeout. Validation allows up to 2 million column-rule checks including missing cells. No partial report is published on failure.

Do the editor and task have the same file limits?

The editor opens files up to 1 GiB and 5 million records, subject to browser storage and decoded-record limits. This task supports up to 100,000 records, 2 million cells and 64 MB of decoded text.

Other ways to work with your CSV

Use these local examples when you prefer a script or SQL. They create separate results and explain where their behavior differs from this browser tool.

Check CSV quoting and record widths with Python

Reports the data-record count or raises an error for quoting or field-count problems. Record numbers count parsed records, so a quoted newline is part of its record.

Before you start

  • Python 3.10 or later. Run in a working folder with a backup of your source; output files may be replaced unless opened in exclusive mode.
  • Place input.csv in that folder. Examples use UTF-8, a comma delimiter and a header row. Column-specific recipes use id,label,amount,status,note; adapt names to your file.
Run the complete Python example
python3 - <<'PY'
import csv

with open("input.csv", encoding="utf-8-sig", newline="") as source:
    reader = csv.reader(source, strict=True)
    headers = next(reader, None)
    if not headers:
        raise ValueError("Expected a nonempty header")
    count = 0
    for record, row in enumerate(reader, start=2):
        if len(row) != len(headers):
            raise ValueError(f"Record {record}: expected {len(headers)} fields, got {len(row)}")
        count += 1
print(f"Checked {count} data records; quoting and widths accepted")
PY

Limits and output

  • CSV has no stored type schema. Python keeps fields as strings until an example explicitly converts a value. These recipes do not add spreadsheet formula protection; import sensitive-looking strings as text in spreadsheets.
  • This checks the Python CSV dialect, not every vendor dialect. It does not enforce required values, column types, uniqueness or allowed-value rules.

Documentation: Python CSV reader and writer

Open-source CSV Validator

Use Shipit Software’s standalone CSV Validator from the command line or in your own tools.