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 version | 4.6.7 |
|---|---|
| Runtime dependencies | 0 |
| Bundled types | Bundled declarations |
| Gzip measurement | 86.82 KiB |
Evidence and freshness
- https://registry.npmjs.org/zod/4.6.7 — retrieved 2026-10-29T05:08:25.293Z
- https://api.deps.dev/v3/systems/npm/packages/zod/versions/4.6.7:dependencies — retrieved 2026-10-28T23:29:56.510Z
- https://bundlephobia.com/api/size?package=zod%404.6.7 — retrieved 2026-10-28T23:29:56.454Z
- https://api.deps.dev/v3/systems/npm/packages/zod/versions/4.6.7 — retrieved 2026-10-29T05:08:25.454Z
- https://api.deps.dev/v3/projects/github.com%2Fcolinhacks%2Fzod — retrieved 2026-10-29T05:08:25.557Z
valibot
| Latest version | 1.5.0 |
|---|---|
| Runtime dependencies | 0 |
| Bundled types | Bundled declarations |
| Gzip measurement | 14.37 KiB |
Evidence and freshness
- https://registry.npmjs.org/valibot/1.5.0 — retrieved 2026-10-29T05:09:11.427Z
- https://api.deps.dev/v3/systems/npm/packages/valibot/versions/1.5.0 — retrieved 2026-10-29T05:09:11.674Z
- https://bundlephobia.com/api/size?package=valibot%401.5.0 — retrieved 2026-10-28T23:29:57.746Z
- https://api.deps.dev/v3/systems/npm/packages/valibot/versions/1.5.0:dependencies — retrieved 2026-10-28T23:29:57.825Z
- https://api.deps.dev/v3/projects/github.com%2Fopen-circle%2Fvalibot — retrieved 2026-10-29T05:09:11.933Z