JavaScript Validation Libraries
Libraries for JavaScript
GitHub Star Comparison
| No | Name | GitHub Stars | Description | Trend | License | Type | Official Site |
|---|---|---|---|---|---|---|---|
| 1 | Zod | ⭐ 40.4k | TypeScript-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. | MIT | TypeScript-first Validator | Official |
| 2 | Yup | ⭐ 23.6k | JavaScript 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. | MIT | Schema Validator | Official |
| 3 | Joi | ⭐ 21.2k | Powerful 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-Clause | Schema Validator | Official |
| 4 | AJV | ⭐ 14.4k | Fast 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. | MIT | JSON Schema Validator | Official |
| 5 | class-validator | ⭐ 11.6k | Validation using decorators and metadata reflection. Popular for NestJS integration. | Maintains stable position. Standard in NestJS ecosystem. Decorator-based API favored in enterprise development. | MIT | Decorator Validator | Official |
| 6 | Valibot | ⭐ 8.1k | Lightweight 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. | MIT | Modular Validator | Official |
| 7 | Superstruct | ⭐ 7.1k | Simple and extensible JavaScript/TypeScript struct validation library. | Maintains stable position. Valued for simple API and lightweight nature, popular in small projects and configuration management. | MIT | Struct Validator | Official |
| 8 | io-ts | ⭐ 6.8k | Runtime type system for TypeScript with functional programming style. | Niche but stable. Highly valued among functional programming enthusiasts. Strong integration with fp-ts ecosystem. | MIT | Functional Validator | Official |