CSV Schema Validator
Validate CSV against an explicit Table Schema subset: exact columns, logical types, required values, bounds, uniqueness and primary keys, without changing cells.
This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.
Check a CSV table against explicit logical column rules and export a bounded issue report without changing or uploading the data.
How to use it
- 1Paste comma-separated CSV and its supported Table Schema JSON.
- 2Validate, then read the pass/failure counts and bounded issue locations.
- 3Download the report and correct the original data separately.
Example
- Input
- CSV: id,amount 001,-1 Schema: {"fields":[{"name":"id","type":"string"},{"name":"amount","type":"number","constraints":{"minimum":0}}]}
- Output
- "valid": false "issues": [{"record":2,"column":2,"rule":"minimum"}]
The report identifies the failed rule without including the original cell value.
What happens to your data
CSV and schema checks run in this tab. Reports contain locations/rules and counts rather than source cell values; the original table is neither uploaded nor automatically rewritten.
Last updated November 2026
Check whether a CSV satisfies a known data contract. The ordinary CSV validator checks syntax and record shape; this workspace checks your declared column types, missing-value rules, allowed values, bounds and keys. Original cell text remains unchanged.
How it works
Supply a comma-separated CSV and a JSON Table Schema subset. Schema field names must match the CSV headers in exact order and count. Supported logical types are string, integer, number, boolean and Gregorian YYYY-MM-DD date. Fields default to string. Missing markers default to an array containing the empty string; comparison happens before logical casting, without trimming. Required fields and every primary-key member cannot be missing. Uniqueness compares valid logical values, so numeric equivalents share a key while string identifiers retain leading zeros. Missing values are excluded from ordinary unique checks.
Supported constraints are required, unique, scalar typed enum, numeric minimum/maximum and Unicode-code-point string minLength/maxLength. Numeric fields use a finite decimal subset: up to 4,096 characters per token and an explicit exponent from -10,000 to 10,000. Leading signs/zeros and decimal/exponent forms are accepted; integer values must be mathematically whole. NaN and INF are outside this subset and fail the field type check. A syntactically valid decimal beyond the processing bounds stops the entire check with a limit error and no partial report. Comparison uses decimal digits rather than binary floating-point rounding. Boolean defaults accept true/True/TRUE/1 and false/False/FALSE/0; an explicit pair of disjoint text lists can replace these. Regex patterns, alternative field matching, remote keys, foreign keys and unsupported properties fail rather than appearing validated. This is a declared subset, not full Table Schema conformance.
The JSON issue report includes parsed record number (header is 1), one-based column number, and rule. Column 0 denotes a table/key-wide issue. It omits source values and field names. At most 500 issues are retained, with the full issue count and truncation count shown. A header mismatch stops cell checks and reports zero checked data rows. Limits are 10,000 records including the header, 128 columns and 200,000 cells. A completed report can contain failed data checks; it is not an assertion that those cells passed.
JSON input rejects duplicate keys and unpaired Unicode, with depth 32 and 20,000 values. Source input is limited to 500 KiB; JSON Schema and CSV schema inputs to 128 KiB. Complete output is limited to 512 KiB and has a shortened on-page preview. Copy and download contain the complete result. Editing source or settings immediately invalidates previous exports. Nothing is fetched or executed from the supplied text.
Worked example: CSV Schema Validator example
- Input
- CSV: id,amount 001,-1 Schema: {"fields":[{"name":"id","type":"string"},{"name":"amount","type":"number","constraints":{"minimum":0}}]}
- Result
- "valid": false "issues": [{"record":2,"column":2,"rule":"minimum"}]
The report identifies the failed rule without including the original cell value.
Common use cases
- Check a reviewed import file before loading another system.
- Validate an expected primary key without converting leading-zero string IDs.
- Give an agent a bounded issue report without copying original row values into it.
Frequently asked questions
Is this the ordinary CSV Validator?+
That tool checks CSV syntax and row shape. This one requires an explicit schema and adds logical type, required, enum, bound and key checks.
Will invalid cells be fixed?+
No. Cells are never rewritten. Download the issue report, correct your source deliberately, and validate again.
Does it execute a schema pattern?+
No. Arbitrary regex patterns, remote schemas and unsupported constraints are rejected.
Standards and limitations
Related tools
CSV Cell Splitter
Split one CSV column by a literal separator, retain text identifiers and choose rows or numbered columns with reviewed exports.
Fixed Width to CSV
Convert a fixed-width text report to CSV with explicit field widths, named columns, optional trimming and clear record-length errors.
CSV Cell Cleaner
Clean whitespace and letter case in selected CSV columns, preserve text IDs and review exact change counts locally.
CSV Unpivot
Unpivot selected CSV columns into attribute and value rows, retain identifiers and choose whether to keep empty values.