JavaScript validation libraries

Compare schema and input validation packages such as Zod, Valibot, Joi, and Yup. Check types, dependency requirements, and bundle measurements.

9 indexed packages. Inspect package specifications and compare alternatives according to their actual role in your application.

Packages in this category

  • Zod: TypeScript-first schema validation with static type inference.
  • Valibot: The modular and type-safe schema library for validating structural data.
  • joi: Object schema validation
  • yup: Dead simple Object schema validation
  • @sinclair/typebox: Json Schema Type Builder with Static Type Resolution for TypeScript
  • ajv: Another JSON Schema Validator
  • arktype: TypeScript's 1:1 validator, optimized from editor to runtime
  • superstruct: A simple and composable way to validate data in JavaScript (and TypeScript).
  • Validator.js: Validation library inspired by Laravel's Validator

What to compare

  • Review schema parsing, coercion, error formatting, and asynchronous-validation needs in the official API.
  • Check whether the required declaration files are bundled and how the documented inference model fits your code.
  • Look for explicit support for interchange formats or integrations rather than assuming all schema tools are interchangeable.
  • Compare equivalent schema imports and retain peer-dependency exclusions when interpreting size measurements.

Example package specifications

zod

Latest version4.6.7
Runtime dependencies0
Bundled typesBundled declarations
Gzip measurement86.82 KiB

Evidence and freshness

valibot

Latest version1.5.0
Runtime dependencies0
Bundled typesBundled declarations
Gzip measurement14.37 KiB

Evidence and freshness

Category comparisons

Filter this category by your requirements