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.
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.
- peers Zod downloads: Zod has 1.83B downloads in 4 weeks, up 8.4x, against Joi's 2.4x.
- pkgpulse.com/guides/joi-vs-zod-2026: Recommends Zod for TypeScript and Joi for legacy Node.js codebases.
- betterstack.com/community/guides/scaling-nodejs/joi-vs-zod: Favors Zod for new TypeScript-focused projects.
- joi.dev/resources/changelog: Active 18.x development, with Standard Schema support.
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.
- betterstack.com/community/guides/scaling-nodejs/joi-vs-zod: Positions Joi for JS-first back ends and Zod for TypeScript projects.
- reintech.io/blog/zod-vs-yup-vs-joi-validation-library-comparison-2026: 2026 comparison that places Joi in Node.js server use.
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.
- joi.dev/api/18.x.x: Documents framework-independent validation, conversion, and object rules.
- github.com/hapijs/joi/blob/v18.3.2/package.json: Declares a browser bundle and a Node.js 20 minimum.
- tsh.io/state-of-frontend: Frontend survey records Joi use and stronger use of Zod.
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.
- joi.dev/resources/changelog: v18 brought Standard Schema, Standard JSON Schema and TypeScript type fixes.
- betterstack.com/community/guides/scaling-nodejs/joi-vs-zod: Limited inference; types must be kept in sync by hand; larger than Zod.
- pkgpulse.com/guides/joi-vs-zod-2026: Independent guide recommends Zod for TypeScript and Joi for legacy codebases.
- npm hasTypes: Ships its own type definitions, but they do not infer the data type from the schema.
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.
- joi.dev/api/18.x.x: Documents conditional rules, validation options, error paths, and examples.
- raw.githubusercontent.com/hapijs/joi/v18.3.2/lib/index.d.ts: The object builder defaults its output type to any.
- reddit.com/r/webdev/comments/1pn1p7v/is_joi_validation_still_the_go_to_struggling_with: Developers describe the risk of separately maintained schemas and types drifting.
- schemabenchmarks.dev/parsing?dataType=invalid&sortBy=mean&sortDir=ascending: Tests Joi 18.3.2 with both first-error and all-error settings.
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.
- github.commitsLastYear, npm.versionsLastYear, npm.latestPublishedAt: 79 commits and 22 npm publishes, with 18.3.2 published November 4.
- joi.dev/resources/changelog: Shows continued fixes on both major lines and Standard Schema support in v18.
- github.com/hapijs/joi/pull/3104: The March 2026 proposal for stronger type inference remains open.
- github.com/hapijs/joi/issues/2926: The v18 migration notes document the Node.js minimum and changed array typings.
- github.com/hapijs/joi/releases/tag/v18.3.2: The latest tag names the same maintainer as the preceding patch tags.
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.
- betterstack.com/community/guides/scaling-nodejs/joi-vs-zod: Calls Joi a fit for complex validation needs and legacy back ends.
- reintech.io/blog/zod-vs-yup-vs-joi-validation-library-comparison-2026: 2026 comparison that favors Zod for new projects.
- hapi framework: Joi is the validation layer of the hapi framework.
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.
- github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-config-schema/src/types/type.ts: Kibana's configuration schema implementation uses Joi.
- docs.nestjs.com/techniques/configuration: NestJS documents Joi 18 support for configuration validation.
- hapi.dev/api/21.x.x: hapi accepts Joi schemas for route inputs and responses.
- tsh.io/state-of-frontend: The 2024 survey reports both positive and negative Joi user experiences.
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.
- github.com/hapijs/joi/security/advisories/GHSA-4528-x5fx-h6hg: The October high-severity advisory identifies 18.3.1 as patched.
- github.com/hapijs/joi/security/advisories/GHSA-6h2x-m376-mqjq: The September high-severity advisory lists patches for both maintained major lines.
- scorecard.score, scorecard.checks: Scorecard 6.2, code review 1, and several protective checks at zero.
- npm.license, npm.dependencies, advisories.last24Months: BSD-3-Clause, seven declared dependencies, and six recent advisories.
- github.com/hapijs/joi/releases/tag/v18.3.2: The public tag identifies the maintainer who created it.
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.