joi vs yup

NPM Package Comparison - Which one should you use?

joi

🏆Most Popular📘TypeScript

Object schema validation

View Repository →
npm install joi

yup

ðŸ“ĶSmallest⭐Most StarredðŸŠķLightweight📘TypeScript

Dead simple Object schema validation

View Repository →
npm install yup

Download Trends (Last 12 Weeks)

When to Choose Each

👉Choose joi if:

  • ✓You want the most battle-tested solution with a larger community

👉Choose yup if:

  • ✓Bundle size is critical for your project
  • ✓You prefer fewer dependencies to reduce supply chain risk

Comparison

Metricjoiyup
Weekly Downloads15.5M9.0M
GitHub Stars21.2k23.7k
Bundle Size557.3 KB270.4 KB
Dependencies74
Last Updated2 months ago4 months ago
TypeScriptYesYes
LicenseBSD-3-ClauseMIT
Version18.0.21.7.1

Related Comparisons