JavaScript Validation Libraries

Libraries for JavaScript

GitHub Star Comparison

JavaScript Validation Libraries GitHub Star Comparison
NoNameGitHub StarsDescriptionTrendLicenseTypeOfficial Site
1Zod⭐ 40.4kTypeScript-first schema validation library with static type inference and excellent developer experience.Rapidly growing modern library. Quickly gaining adoption among TypeScript developers. Highly valued for type safety and developer experience.MITTypeScript-first ValidatorOfficial
2Yup⭐ 23.6kJavaScript object schema validator. Popular for form validation combined with Formik.Maintains stable position. Standard validation library in React/Formik ecosystem. Valued for its simple API.MITSchema ValidatorOfficial
3Joi⭐ 21.2kPowerful schema description and validation library for Node.js. Widely used for server-side validation.Maintains stable position. Standard for server-side validation in enterprise environments. Rich features and mature ecosystem.BSD-3-ClauseSchema ValidatorOfficial
4AJV⭐ 14.4kFast JSON data validator using JSON Schema. Characterized by high performance.Maintains stable position. Widely adopted in enterprise systems with JSON Schema standard compliance. High performance is its strength.MITJSON Schema ValidatorOfficial
5class-validator⭐ 11.6kValidation using decorators and metadata reflection. Popular for NestJS integration.Maintains stable position. Standard in NestJS ecosystem. Decorator-based API favored in enterprise development.MITDecorator ValidatorOfficial
6Valibot⭐ 8.1kLightweight and modular schema library. Emerging as a notable alternative to Zod.Rapidly growing. Gaining attention as Zod alternative with modular design and small bundle size. Popular among frontend developers.MITModular ValidatorOfficial
7Superstruct⭐ 7.1kSimple and extensible JavaScript/TypeScript struct validation library.Maintains stable position. Valued for simple API and lightweight nature, popular in small projects and configuration management.MITStruct ValidatorOfficial
8io-ts⭐ 6.8kRuntime type system for TypeScript with functional programming style.Niche but stable. Highly valued among functional programming enthusiasts. Strong integration with fp-ts ecosystem.MITFunctional ValidatorOfficial