compare
class-validator vs Zod
The same facts for both, read from GitHub every night, and the relation a person reviewed.
| Fact | class-validator | Zod |
|---|---|---|
| Language | TypeScript | TypeScript |
| Licence | MIT | MIT |
| Stars | 12k | 44k |
| Latest | v0.15.1 | v4.6.7 |
| Last push | 2026-03-25 | 2026-11-22 |
| Release cadence | about 47 days between releases | about 1 day between releases |
| Active contributors | 0 commit authors on the default branch in the last 90 days | 8 commit authors on the default branch in the last 90 days |
| Flags | none | none |
How they relate
Both replace Joi. Alternatives to Joi →
Partialclass-validatorValidation rules declared as decorators on TypeScript classes instead of a schema object.
Full replacementZodSchema validation with static type inference, for Node.js and browsers.
class-validator
- v0.15.12026-02-26chore: publish 0.15.0 for real
- v0.15.02026-02-26feat: add IsISO31661Numeric decorator for country codes
- v0.14.42026-02-25build(deps-dev): bump js-yaml from 3.14.1 to 3.14.2 by @dependabot[bot] in
- v0.14.32025-11-24build: update validator to 13.15.20
- v0.14.22025-05-02fix: forbidUnknownValues should default true when validatorOptions undefined
Zod
- v4.6.72026-10-12b500a2ee95134f81d74da7911d7378dd2853d042 4.6.7
- v4.6.62026-10-11> Six malicious commits pushed to main on September 21 with a compromised git credential were reverted the same day in…
- v4.6.52026-09-13d2b135cfb7a3582b9eb515756b9166bcb9521f4a docs: add the 4.6.x patch highlights to the 4.6 post
- v4.6.42026-09-13A patch on top of 4.6.3.
- v4.6.32026-09-12A patch on top of 4.6.2.
class-validator
✓ signed The latest release, v0.15.1, carries a signature GitHub verified.
Loading the security report
Zod
✓ signed The latest release, v4.6.7, carries a signature GitHub verified.
Loading the security report