joi vs yup

NPM Package Comparison - Which one should you use?

joi

🏆Most Popular🔄Recently Updated📘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
  • ✓You need actively maintained software with recent updates

👉Choose yup if:

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

Comparison

Metricjoiyup
Weekly Downloads21.1M11.8M
GitHub Stars21.2k23.7k
Bundle Size584.1 KB270.4 KB
Dependencies74
Last Updated2 weeks ago8 months ago
TypeScriptYesYes
LicenseBSD-3-ClauseMIT
Version18.2.11.7.1

Related Comparisons