yup vs zod

NPM Package Comparison - Which one should you use?

yup

ðŸ“ĶSmallest📘TypeScript

Dead simple Object schema validation

View Repository →
npm install yup

zod

🏆Most Popular⭐Most StarredðŸŠķLightweight📘TypeScript

TypeScript-first schema declaration and validation library with static type inference

View Repository →
npm install zod

Download Trends (Last 12 Weeks)

When to Choose Each

👉Choose yup if:

  • ✓Bundle size is critical for your project

👉Choose zod if:

  • ✓You want the most battle-tested solution with a larger community
  • ✓You prefer fewer dependencies to reduce supply chain risk
  • ✓You need actively maintained software with recent updates
  • ✓Community popularity and ecosystem support matter to you

Comparison

Metricyupzod
Weekly Downloads10.5M145.6M
GitHub Stars23.7k42.2k
Bundle Size270.4 KB4.3 MB
Dependencies40
Last Updated6 months ago2 months ago
TypeScriptYesYes
LicenseMITMIT
Version1.7.14.3.6

Related Comparisons