Zod vs Ajv
In 4,864 JavaScript/TypeScript projects set up for AI coding agents, Zod is a dependency in 1,579 (32.5%) and Ajv in 153 (3.1%): Zod is 10.3× as common. Among repos created in the last 90 days that use a forms, validation and schemas tool, Zod is in 87.2% and Ajv in 11.7%, against 87.0% and 8.2% of older ones. 79 projects list both, often a sign of a migration or of a monorepo with several apps.
Forms, validation and schemas npm Updated Nov 17, 2026
Side by side
| Zod | Ajv | |
|---|---|---|
| Agent projects that use it | 1,579 | 153 |
| Rank in forms, validation and schemas | #1 | #5 |
| In new repos with a forms, validation and schemas tool (last 90 days) | 87.2% | 11.7% |
| In older repos with one | 87.0% | 8.2% |
| Downloads, last 7 days | 462M | 528M |
| GitHub stars | 44.3K | 14.9K |
| Last push to its repo | Nov 16, 2026 | Sep 6, 2026 |
| License | MIT | MIT |
| Funding | — | Yes |
| Projects that list both | 79 | |
Downloads include CI runs and installs as a dependency of other packages. Stars and pushes are from GitHub's API; downloads from npm.
By coding agent
| Projects set up for | JavaScript/TypeScript repos | Zod | Ajv |
|---|---|---|---|
| Claude Code | 2,617 | 32.9% | 4.2% |
| GitHub Copilot | 2,350 | 30.3% | 3.3% |
| Cursor | 1,990 | 36.2% | 2.3% |
| Gemini CLI | 422 | 32.2% | 10.2% |
| OpenAI Codex | 409 | 31.5% | 5.4% |
| OpenCode | 304 | 31.9% | 4.9% |
| OpenClaw | 241 | 30.7% | 14.5% |
| Devin Desktop | 231 | 32.5% | 0% |
| Kiro | 125 | 32.0% | 16.0% |
| Roo-Code | 90 | 36.7% | 0% |
Share of the JavaScript/TypeScript repos configured for each agent (its config file in the repo) that list the tool. A repo set up for two agents counts for both.
Zod
TypeScript-first schema validation library with static type inference.
Most often used with it:
| TypeScript | 93.5% of its projects |
|---|---|
| React Hook Form Resolvers | 31.2% of its projects |
| clsx | 48.1% of its projects |
| Tailwind Merge | 47.4% of its projects |
| React Hook Form | 32.6% of its projects |
npm install zod
Ajv
Fast JSON Schema validator for runtime schema validation and serialization.
Most often used with it:
| ajv-formats | 37.3% of its projects |
|---|---|
| yaml | 31.4% of its projects |
| Commander | 30.7% of its projects |
| ws | 29.4% of its projects |
| chalk | 28.8% of its projects |
npm install ajv
More matchups
How we count
Projects are public GitHub repos our weekly scan finds through coding-agent config files (CLAUDE.md, AGENTS.md, .cursor/mcp.json and others); a project uses a tool when its package.json, requirements.txt or pyproject.toml lists it. "Same job" was checked for every pair, so add-ons and companions are never paired. Shares by repo age compare repos created in the last 90 days with older ones in the same scan. More on the method.