Spreadsheet & CSV Tools

Data Validation Generator

Turn sample data into validation rules. The generator infers each field’s type, whether it is always present, formats such as email, URL and date, non-negative numbers, and enums for columns with a few repeated values. It writes the rules as JSON Schema (draft 2020-12), a Zod schema for TypeScript, a Pydantic model for Python or SQL CHECK constraints, with a table explaining every rule.

  • Runs in your browser
  • No sign-up
  • Free to use

Processed entirely in your browser – your data is not uploaded. Files up to 50 MB.

How to use Data Validation Generator

  1. Paste a representative sample.
  2. Choose the output format and type name.
  3. Review the inferred rules.
  4. Copy the schema into your project.

Data Validation Generator features

Four outputs

JSON Schema, Zod, Pydantic, SQL.

Formats

email, uri and date.

Enums

For small sets of values.

Required fields

From columns that are never empty.

Rule table

Explains each inference.

Private

Runs in your browser; nothing is uploaded.

When to use Data Validation Generator

  • Validating imports and API payloads.
  • Bootstrapping TypeScript or Python types.
  • Documenting data contracts.
  • Adding database constraints.

Data Validation Generator FAQ

Are the rules complete?

They reflect the sample. Use a representative sample and review enums and limits.

Why are length limits higher than the sample?

They are set 50% above the longest value so normal data is not rejected.

Which JSON Schema version?

Draft 2020-12.

Validate at the boundary

Rejecting bad data when it enters a system is cheaper than repairing it later.

Private by design: your data is read and processed entirely in your browser with JavaScript. Nothing is uploaded to our server, so you can work with customer lists, exports and internal reports safely. Files up to 50 MB are supported; very large files depend on your device’s memory.

Input formats: paste or open CSV (comma, semicolon, tab or pipe – detected automatically), TSV or JSON (an array of objects, an object with a data, items or results array, or JSON Lines). The first CSV row is used as the header; JSON keys become columns, and nested values are kept as JSON text.

Missing values are recognised consistently across the data tools: empty cells and common placeholders such as NULL, N/A, NA, NaN, none, “-” and undefined. Types are inferred from the values – integer, decimal, boolean, date, email, URL, JSON or text – and columns with mixed types are flagged.

Related tools on this site cover the rest of a data workflow: the CSV cleaner, viewer, splitter and merger, converters between CSV, JSON, Excel and SQL, the JSON formatter and validator, and the other profiling, validation and statistics tools in this group.

Who it is for: analysts preparing data for a report, developers checking an API export or a database dump, marketers cleaning contact lists before an import, and students learning data quality. No account, no installation and no spreadsheet formulas are needed.

Other useful tools