Joi
Popular schema validation library for runtime data validation with flexible rules.
Forms, validation and schemas npm BSD-3-Clause
How Joi is used
Joi is a dependency in 7 of the 6,208 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983); counting those, it appears in 37 projects, and what it is used with below comes from all of them. The most used alternative in our scan is Zod (1,553 projects). Projects that use it most often also use dotenv (75.7%), Express (75.7%), cors (64.9%).
Joi popularity over time
Gid Score 64: downloads 89, use in agent projects 36, GitHub stars 62, downloads trend 53 (each 0-100). How it is calculated.
Often used with Joi
| dotenv | 75.7% of Joi projects · 4.9× more than average |
|---|---|
| Express | 75.7% of Joi projects · 11.2× more than average |
| cors | 64.9% of Joi projects · 20.5× more than average |
| Jest | 64.9% of Joi projects · 10.2× more than average |
| jsonwebtoken | 59.5% of Joi projects · 24.9× more than average |
| ts-node | 59.5% of Joi projects · 12.5× more than average |
| Helmet | 56.8% of Joi projects · 37.5× more than average |
| uuid | 54.1% of Joi projects · 11.5× more than average |
From all 37 projects in our scan that use Joi, including the dependency samples.
By coding agent
| GitHub Copilot | 0.2% of projects set up for it |
|---|
Share of public repos configured for each agent that list Joi as a dependency.
How Joi is funded
Open Collective: hapijs
| Received, last 12 months | $2,282 Oct 2025 – Sep 2026 |
|---|---|
| Estimated annual budget | $2,609 Open Collective's estimate |
| Balance | $48,145 |
| Raised since the start | $53,742 · $5,596 paid out |
| Typical month median, last 12 months | $192 · $300 over 24 months |
| Last 12 months vs the 12 before | -54% |
| Contributors, last 12 months | 5 |
Top company backers all time, 7 companies in total
| Datawrapper | $25,750 since Oct 2020 |
|---|---|
| John Wiley & Sons Ltd | $10,000 since Oct 2021 |
| Raider.IO | $6,900 since Jan 2021 |
| Florence Healthcare | $6,750 since Oct 2021 |
| Mirus Research | $500 since Feb 2022 |
Oct 2021Sep 2026
Money by month, last five years. First money received in Aug 2020. The typical month is the median: one big one-off donation does not move it.
Open Collective lists this collective for the hapijs organization on GitHub, so the money is for all of its projects, not Joi alone.
USD after payment processor fees, as Open Collective reports it; fiscal host Open Source Collective. Source
Install
| Package | npm install joi |
|---|---|
| Main stacks | TypeScript / JavaScript (30), Next.js (5), Python (2) |
| Example projects | chat-stack/chat-stack, Giveth/notification-center, lapic-ufjf/searchat-behavior-api, kalviumcommunity/compilerd, masharratt/claude-flow-novice |
Alternatives to Joi
Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside Joi are not listed here; they are in "Often used with".
| Tool | Gid Score | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|---|
| Zod npm TypeScript-first schema validation library with static type inference. |
88 | 1,553 (32.2%) | 207M | 44.2K | MIT |
| Valibot npm Modular and type-safe schema validation library for structural data with minimal bundle size. |
62 | 33 (0.7%) | 13.1M | 9,044 | MIT |
| TypeBox npm JSON Schema type builder with static type resolution for TypeScript validation. |
55 | 30 (0.6%) | 118M | 12 | MIT |
| zod-validation-error npm Format Zod validation errors into user-friendly readable messages. |
57 | 21 (0.4%) | 34.1M | 1,021 | MIT |
| Yup npm Simple schema validation library for JavaScript with chainable API and error handling. |
64 | 17 (0.4%) | 6.8M | 23.7K | MIT |
More in Forms, validation and schemas: React Hook Form Pydantic React Hook Form Resolvers Ajv jsonschema ajv-formats Protocol Buffers zod-to-json-schema