# Joi: 6.2 out of 10

Reasonable, with limits. 6th of 10 in [Validation libraries](https://elestia.ai/opensource/validation/index.md).

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.

## Scores

- **Overall: 6.2** (likely 5.1 to 7.2)
  - Claude Opus 5.5 (5.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): 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.
- **Needed by many: 7.0** (likely 6.0 to 8.1)
  - Claude Opus 5.5 (7.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): 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 lot: 6.8** (likely 5.8 to 7.8)
  - Claude Opus 5.5 (6.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): 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 time: 6.5** (likely 5.4 to 7.6)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (7.0): 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 widely: 6.6** (likely 5.5 to 7.6)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (7.1): 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.
- **Vouched for: 6.8** (likely 5.3 to 7.8)
  - Claude Opus 5.5 (6.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): 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.
- **Safe: 6.3** (likely 5.2 to 7.4)
  - Claude Opus 5.5 (6.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).
  - GPT-6.2 Sol (6.6): 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

- Downloads, 4 weeks: 136M
- In a year: ×2.4
- GitHub stars: 21k
- Commits, 12 months: 79
- Last npm release: Nov 2026
- Advisories, 24 months: 6
- Licence: BSD-3-Clause
- GitHub: https://github.com/hapijs/joi
- npm: https://www.npmjs.com/package/joi

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
