Elestia Open Source Ratings
6.2

Joi

Reasonable, with limits. 6th of 10 validation libraries.

Joi is a mature, feature-rich schema validator from the hapi ecosystem. It has strong error messages and many built-in rules, and since v18 it supports Standard Schema and JSON Schema export. It does not infer TypeScript types from the schema and its bundle is large, so for new TypeScript projects Zod or Valibot do the job better. Joi remains a sound choice mainly for existing Node.js back ends.

Best for: JavaScript-first Node.js back ends, especially hapi apps or codebases that already use Joi and need rich rules and customizable error messages.

GitHubnpm

Scores

Overall6.2

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

Joi is a capable, maintained validator with excellent rules and error messages, and Standard Schema support keeps it compatible with newer tools. For a new TypeScript project, though, Zod (and Valibot or ArkType) give types and validation from one schema with a smaller bundle and much faster growth. Joi ranks below those but above unmaintained peers such as Yup, Superstruct and io-ts. It is a reasonable pick for JavaScript-first Node.js back ends, not the default.

GPT-6.2 Sol: 7.3, likely 6.2 to 8.4

Joi is a strong choice for a new Node.js service that needs cross-field rules, controlled coercion, and detailed validation errors. Regular releases and framework support make it a credible dependency for new work. For most new TypeScript projects, Zod's automatic object type inference gives it the edge, and Joi's below-median download growth adds uncertainty about future adoption.

  • joi.dev/api/18.x.x: Documents the runtime rules and errors that make Joi a strong server choice.
  • joi.dev/resources/changelog: Shows active bug fixes, security patches, and interoperability work.
  • zod.dev/basics: Zod derives TypeScript output types directly from object schemas.
  • npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers: Joi retains substantial use while growing more slowly than the catalog median and Zod.
Needed by many7.0

How many developers need a tool for this job?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

Most JavaScript and TypeScript projects need to validate data, so the category is broad. Joi's take is mainly for server-side Node.js work. Its size and lack of type inference make it a weak fit for front-end and type-first projects, which narrows it a little.

GPT-6.2 Sol: 7.0, likely 6.0 to 8.1

Runtime validation is useful wherever applications accept requests, forms, configuration, or external data. Joi works across frameworks and ships a browser bundle, with its strongest fit on the server. Its appeal on the frontend depends on bundle budgets and how much teams rely on inferred TypeScript types.

Helps a lot6.8

How well does it do the job for those who need it?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

Joi's rule set and error customization are among the richest available. Joi 18 added Standard Schema and JSON Schema export. The main gap for TypeScript users is that it gives no static type inference, so schema and types drift apart; Zod, Valibot and ArkType all close that gap. Its bundle is also heavy for browser use.

GPT-6.2 Sol: 7.5, likely 6.5 to 8.6

Joi 18.3.2 has a detailed reference for conditional rules, coercion, and errors that identify the failing field. The bundled declarations type the API, but object output types generally need to be supplied separately. In one current benchmark, Joi rejected bad input quickly when stopping at the first error and took longer than Zod when collecting all errors. The reference gives coding agents examples for routine schemas, but evidence on how reliably they handle advanced rules is limited.

Holds up over time6.5

Will it still be a good choice in two years?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

Joi is actively maintained: 79 commits and 22 npm versions in the last year, the latest published on 2026-11-04, and the v18 work on Standard Schema. A small hapi community team maintains it without a major corporate sponsor. The ecosystem is moving towards type-inferring validators, which caps how long Joi stays a good choice for new work.

  • github commitsLastYear: 79 commits in the last year.
  • npm versionsLastYear: 22 versions; latest 18.3.2 on 2026-11-04.
  • github openIssues/closedIssues: 177 open against 2222 closed; issues are handled steadily.
  • joi.dev/resources/changelog: Frequent 18.x patch releases.

GPT-6.2 Sol: 7.0, likely 5.7 to 8.1

Joi had 79 commits and 22 npm version publishes in the past year, with fixes on both the 17 and 18 lines. Larger changes move more slowly, as shown by the open TypeScript inference proposal, and version 18 raised the Node.js minimum. Recent tags are concentrated under one maintainer, and public records give limited visibility into backup publishers or funding.

Used widely6.6

How many use it, and is that growing?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

Joi has very large installed use: 136M downloads in 4 weeks and 580k dependent repos, second only to Ajv and TypeBox among the peers. Its year-over-year ratio is about 2.4, well below the 4.1 median, while Zod (8.4x) and Valibot (15x) grow much faster. Much of its volume comes from older codebases and from tools that install it, so direct new choices are fewer than the totals suggest.

  • npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 136.1M against 56.8M a year ago, a ratio of about 2.4, below the 4.1 median.
  • dependents repos: 580,239 dependent repos, more than Zod's 122,785.
  • bluesky posts: 0 posts, against 32 for Zod and 88 for ArkType; little current attention.
  • hackerNews stories: No matching stories.

GPT-6.2 Sol: 7.1, likely 5.9 to 8.2

About 580,000 tracked repositories, 8,000 dependent npm packages, and 21,000 stars indicate a large installed base. Four-week downloads rose from 57 million to 136 million, a 2.4× increase against the catalog median of 4.1× and Zod's 8.4×. The collected Bluesky sample also shows less recent attention than Zod or Valibot. Automated and indirect installs make the pace of new adoption harder to estimate.

  • dependents.repos, dependents.packages, github.stars: 580,239 tracked repositories, 7,976 packages, and 21,167 stars.
  • npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers: Joi grew 2.4× against the 4.1× median and Zod's 8.4×.
  • bluesky.posts, peers: The collector found zero links for Joi, 32 for Zod, and 12 for Valibot.
  • github.com/arb/celebrate: Celebrate installs Joi as a dependency for Express validation.
Vouched for6.8

Who stands behind it being good?

Claude Opus 5.5: 6.0, likely 4.0 to 7.0

Joi has long production use behind it in hapi and many enterprise Node.js back ends, and independent write-ups still describe it as mature and feature-complete. Current endorsements mostly favor Zod for new work, and Joi shows no fresh survey signal or community buzz. Most of its validation is old rather than current.

GPT-6.2 Sol: 7.6, likely 6.5 to 8.6

Elastic uses Joi in Kibana's configuration validation, and NestJS documents support for Joi 18. Hapi supports it for request and response validation. State of Frontend 2024 recorded more positive than negative reports from Joi users, though that survey gives limited insight into satisfaction with the current release.

Safe6.3

How safe is it to depend on?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

Joi had six advisories in 2026, two rated HIGH (ReDoS in isoDate, quadratic email splitting) and the rest prototype-pollution issues. All were fixed quickly in 18.2.x and 18.3.x patches. Its 7 dependencies all come from the same hapi team, and the licence is BSD-3-Clause. The Scorecard is 6.2, with weak Code-Review (1), Pinned-Dependencies (0) and SAST (0).

  • advisories last24Months: Six advisories, two HIGH, all published in 2026.
  • joi.dev/resources/changelog: Security fixes shipped in 18.2.1, 18.2.3–18.2.5, 18.2.9 and 18.3.1.
  • scorecard score: 6.2 overall; Code-Review 1, Pinned-Dependencies 0, SAST 0.
  • npm dependencies/license: 7 @hapi dependencies; BSD-3-Clause.

GPT-6.2 Sol: 6.6, likely 5.4 to 7.8

Both recent high-severity denial-of-service advisories had patches available at disclosure, and 18.3.2 includes those fixes. Joi has a permissive BSD-3-Clause licence and seven declared dependencies. The 6.2 OpenSSF Scorecard shows weak code review and zero scores for dependency pinning, fuzzing, and static analysis. The public release tags show who tagged recent patches and give limited visibility into npm publishing controls.

Good

  • A very large set of built-in rules (conditionals, references, alternatives, renames, coercion) for complex server-side validation.
  • Detailed error messages that are easy to customize per rule and per language.
  • Joi 18 implements Standard Schema and can export JSON Schema, so it works with newer tools that accept any compliant validator.
  • Maintainers fixed six advisories in 2026 quickly, in patch releases.

Bad

  • It does not infer TypeScript types from the schema, so types must be written by hand and kept in sync with it.
  • The bundle is large compared with Zod or Valibot, which makes it a poor fit for front-end code.
  • Six advisories in 2026 (DoS through regex and quadratic splitting, prototype pollution) show a large and complex attack surface.
  • Downloads grow slower than the median, and new TypeScript projects mostly choose Zod instead.

The numbers

npm downloads, 4 weeks
136M ×2.4 in a year
GitHub stars
21k
Commits, 12 months
79
npm version
18.3.2 Nov 2026
Versions, 12 months
22
Advisories, 24 months
6 of 6 ever
OpenSSF Scorecard
6.2 out of 10, Nov 2026
Licence
BSD-3-Clause

Read on 21 November 2026 from GitHub (hapijs/joi), npm (joi), OSV and the OpenSSF Scorecard.

Validation libraries

  1. 9.0Zod
  2. 7.9Valibot
  3. 7.5TypeBox
  4. 7.2ArkType
  5. 7.1Ajv
  6. 6.2Joi
  7. 5.6class-validator
  8. 5.2Yup
  9. 3.9Superstruct
  10. 3.8io-ts
Compare all 10 on six scores