GitHub

Best TypeScript validation libraries

Libraries that check data at runtime, from form input to API payloads. ajv leads with about 518M real installs a week, followed by zod with about 453M.

packagereal installs / weeknpm / weeknoiselast releaseconfidence
1. ajvAnother JSON Schema Validator 518M 518,007,029 under 1% Apr 2026 high
2. zodTypeScript-first schema declaration and validation library with static type inference 453M 453,207,139 under 1% Oct 2026 high
3. joiObject schema validation 34.5M 34,493,196 under 1% Nov 2026 high
4. valibotThe modular and type safe schema library for validating structural data 32M 31,975,379 under 1% Sep 2026 high
5. class-validatorDecorator-based property validation for classes. 17M 17,035,268 under 1% Feb 2026 high
6. yupDead simple Object schema validation 16.4M 16,369,893 under 1% Sep 2025 high
7. superstructA simple and composable way to validate data in JavaScript (and TypeScript). 9.64M–9.65M 9,646,688 under 1% Jul 2024 high
8. arktypeTypeScript's 1:1 validator, optimized from editor to runtime 2.84M 2,842,220 under 1% Oct 2026 high

Ranked by real installs. That measures use, not quality: read the notes below before choosing. Mirror spikes and crawlers removed. CI and dependency installs still count, so this is not a head count. Noise: the share of npm's count that mirror spikes and crawlers account for. What remains still includes CI and dependency installs. Rows are refreshed in rotation, the oldest here on Nov 6, 2026.

How do they differ?

Zod infers TypeScript types from its schemas. Valibot has a similar idea with a modular design for small bundles. Yup and Joi are older, and Joi is mostly used on the server. Ajv validates JSON Schema, which helps when a schema is shared across languages. class-validator uses decorators and is common with NestJS.

Check a package