# Zod: 9.0 out of 10

The default choice. 1st of 10 in [Validation libraries](https://elestia.ai/opensource/validation/index.md).

Zod is the TypeScript-first schema library that most new TypeScript projects reach for. You get validation and a static type from one schema, with no dependencies. Zod 4 and the opt-in compiler added in 4.5 have closed most of its old speed gap. It is the default pick today, but watch two things: its default eval use can trip strict CSP setups, and a September 2026 credential compromise put a malicious commit in the repository (it was reverted and never reached npm).

**Best for:** Any TypeScript team that wants one schema to give both runtime validation and static types, with the widest ecosystem of integrations.

## Scores

- **Overall: 9.0** (likely 8.1 to 9.6)
  - Claude Opus 5.5 (9.0): Zod is the default validation library for TypeScript today. It has the best ecosystem, strong quality, fast-moving maintenance and performance that is now competitive. Valibot is the better pick when bundle size matters and ArkType when raw speed does, but neither beats Zod for most people. The September 2026 credential compromise, the weak Scorecard and the CSP friction keep the range from reaching 10.
  - GPT-6.2 Sol (9.0): Zod 4.6.7 is the best general-purpose choice in this group for a new TypeScript project because typed parsing, usable errors, and common integrations work together. Prefer Valibot when client bundle size dominates, or Ajv when JSON Schema is the source of truth. Workload-dependent performance and concentrated release ownership are the main reasons for the lower end of the range.
- **Needed by many: 8.3** (likely 7.3 to 9.0)
  - Claude Opus 5.5 (8.5): Almost every TypeScript app checks outside data: API input, forms, environment variables and LLM output. Zod's TypeScript-first approach fits that majority. Plain-JavaScript or JSON Schema-centric projects need it less, so this is not a 10.
  - GPT-6.2 Sol (8.1): Runtime validation applies to forms, API payloads, configuration, and other inputs across browsers and servers. Zod works with plain JavaScript, and schema inference is most valuable to TypeScript teams. The surveys show broad use, with some uncertainty about how often teams need a dedicated validator.
- **Helps a lot: 8.7** (likely 7.8 to 9.3)
  - Claude Opus 5.5 (8.5): Its type inference, API coverage, documentation and error handling are strong, and AI coding agents write correct Zod code very reliably. Zod 4 and the compiler lifted it close to Typia and ArkType in benchmarks. CSP friction from eval and a bigger bundle than Valibot keep it short of a 9+.
  - GPT-6.2 Sol (8.9): Zod pairs composable schemas and accurate type inference with field-level errors, transforms, and JSON Schema export. Versioned examples and searchable docs give coding agents a clear reference, though their accuracy was not measured directly. In Deepkit’s benchmark, ArkType and TypeBox processed valid data faster, while Zod returned detailed errors faster on the tested invalid input. Optional compilation helps eligible schemas, and its payoff depends on the schema and runtime.
- **Holds up over time: 8.3** (likely 7.2 to 9.1)
  - Claude Opus 5.5 (8.5): The project is very active: 576 commits and 27 releases in the year, with issues handled quickly (108 open against 3,197 closed). The ecosystem keeps moving towards it. Two things hold the score down: it depends on one lead maintainer, and big rewrites like v3 to v4 cost users migration work.
  - GPT-6.2 Sol (8.1): Zod shipped 27 releases and recorded 576 commits in the past year, and a small recent sample shows quick issue replies and pull request merges. Clerk funded Zod 4 development, and one account is listed as the npm maintainer. The v3-to-v4 upgrade changed validation behavior and caused downstream migration work. Continued funding and who could take over releases remain uncertain.
- **Used widely: 9.0** (likely 8.1 to 9.7)
  - Claude Opus 5.5 (9.5): Downloads grew from 217M to 1.83B per 4 weeks, a ratio of about 8.4 against a median of 4.1. Part of that comes from AI and MCP SDKs that install Zod for their users. Even so, State of JS puts it first by usage, and it is a direct choice in a huge number of projects.
  - GPT-6.2 Sol (8.4): Four-week downloads grew 8.4× year over year against a 4.1× catalog median, and State of JavaScript also reported growth. Valibot grew faster from a smaller base, and ArkType drew more Bluesky links. ecosyste.ms found about 123,000 dependent repositories and 6,100 packages, with higher repository counts for Joi, Ajv, and the old TypeBox package. Repeated builds, transitive installs, and partial repository coverage leave the number of direct choices uncertain.
- **Vouched for: 8.9** (likely 7.9 to 9.5)
  - Claude Opus 5.5 (9.0): Major frameworks and SDKs build on it, including tRPC, React Hook Form and AI/MCP SDKs, and it leads current developer surveys. Outlets such as InfoQ cover its releases independently. Most benchmark numbers are still framed by Zod itself.
  - GPT-6.2 Sol (8.8): tRPC recommends Zod by default, and Vercel AI SDK and React Hook Form maintain direct integrations. Clerk reports using Zod and funded the v4 work. The 2024 State of Frontend survey found 34.6% of respondents had used and liked Zod and 7.3% had used and disliked it. That sentiment survey predates v4, so current confidence rests more on maintained integrations and recent testing.
- **Safe: 6.7** (likely 5.3 to 7.8)
  - Claude Opus 5.5 (6.5): It has no dependencies and an MIT licence, and only two advisories, both denial-of-service. One is a HIGH memory-exhaustion issue from October 2026. In September 2026 a stolen push credential put a malicious commit on main. It was reverted before publishing, and the publish process then moved to 2FA-gated staged releases. Scorecard is 5.5 with Code-Review 0 and Token-Permissions 0, so open concerns remain.
  - GPT-6.2 Sol (6.9): Zod has no runtime dependencies and uses the permissive MIT license. Version 4.6.6 shipped 10 days after the October advisory and fixed checks on bounded collections, while unbounded parsing can still accumulate errors and the v3 line remains affected. Malicious commits were reverted the day they reached the repository, never shipped to npm, and releases now use staged approval with provenance. A single listed npm maintainer and the 5.5 OpenSSF Scorecard, with weak review, token permissions, fuzzing, and branch protection checks, keep the score down.

## Good

- One schema gives runtime validation and an inferred static type, and the API covers codecs, recursion, JSON Schema output and many locales.
- It has the largest ecosystem in the category: tRPC, React Hook Form, the MCP and AI SDKs, many backend frameworks, and Standard Schema support.
- It has no dependencies, an MIT licence, and very active development: 576 commits and 27 releases in the last year.
- Zod 4 plus the opt-in z.compile() makes validation fast enough for most hot paths.

## Bad

- By default Zod 4 uses new Function or eval, which strict Content Security Policies block unless you configure jitless mode.
- Its method-chaining design makes bundles larger than Valibot's, which matters for client-side code.
- Release and security depend heavily on one lead maintainer, and the OpenSSF Scorecard shows no enforced code review.
- Moving from v3 to v4 needed migration work, and some 4.x releases brought regressions, such as the 4.5 memory leak in recursive schemas.

## The numbers

- Downloads, 4 weeks: 1.8B
- In a year: ×8.4
- GitHub stars: 44k
- Commits, 12 months: 576
- Last npm release: Oct 2026
- Advisories, 24 months: 1
- Licence: MIT
- GitHub: https://github.com/colinhacks/zod
- npm: https://www.npmjs.com/package/zod

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.
