Elestia Open Source Ratings
9.0

Zod

The default choice. 1st of 10 validation libraries.

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.

WebsiteGitHubnpm

Scores

Overall9.0

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 9.0, likely 8.0 to 9.5

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, likely 8.1 to 9.6

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 many8.3

How many developers need a tool for this job?

Claude Opus 5.5: 8.5, likely 7.5 to 9.0

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, likely 7.0 to 9.0

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 lot8.7

How well does it do the job for those who need it?

Claude Opus 5.5: 8.5, likely 7.5 to 9.0

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, likely 8.0 to 9.6

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 time8.3

Will it still be a good choice in two years?

Claude Opus 5.5: 8.5, likely 7.5 to 9.0

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.

  • github commitsLastYear: 576 commits; pushed a day before readAt
  • github releasesLastYear: 27 releases, latest v4.6.7
  • github openIssues: 108 open against 3,197 closed
  • infoq.com/news/2026/10/zod-schema-compliation: 4.6 fixed a 4.5 regression in recursive schemas

GPT-6.2 Sol: 8.1, likely 6.9 to 9.2

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 widely9.0

How many use it, and is that growing?

Claude Opus 5.5: 9.5, likely 9.0 to 10.0

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.

  • npm downloadsLast4Weeks: 1.83B, up from 217M a year earlier
  • github stars: 44k stars, far ahead of every peer
  • 2025.stateofjs.com/en-US/other-tools: Ranked 1st and up 2 places; 'a lot of growth year-over-year'

GPT-6.2 Sol: 8.4, likely 7.2 to 9.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.

  • npm downloadsLast4Weeks: 1.83 billion installs over four weeks.
  • npm downloadsSame4WeeksYearAgo: 217 million installs in the comparable window.
  • medianDownloadsRatio: 4.1× year-over-year baseline.
  • dependents: 122,785 repositories and 6,111 packages in the index.
  • github stars: 44,375 stars, the highest in the peer bundle.
  • peers: Valibot grew 14.9×, and Ajv and old TypeBox have substantial transitive use.
  • bluesky posts: 32 links to Zod, compared with 88 for ArkType and 12 for Valibot.
  • 2025.stateofjs.com/en-US/other-tools: 5,241 respondents reported use, and the survey noted year-over-year growth.
Vouched for8.9

Who stands behind it being good?

Claude Opus 5.5: 9.0, likely 8.0 to 9.5

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, likely 7.8 to 9.5

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.

Safe6.7

How safe is it to depend on?

Claude Opus 5.5: 6.5, likely 5.0 to 7.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, likely 5.6 to 8.1

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

npm downloads, 4 weeks
1.8B ×8.4 in a year
GitHub stars
44k
Commits, 12 months
576
npm version
4.6.7 Oct 2026
Versions, 12 months
27
Advisories, 24 months
1 of 2 ever
OpenSSF Scorecard
5.5 out of 10, Nov 2026
Licence
MIT

Read on 21 November 2026 from GitHub (colinhacks/zod), npm (zod), OSV and the OpenSSF Scorecard.

Validation libraries

  1. 9.0Zod
  2. 7.9Valibot
  3. 7.5TypeBox
  4. 7.2ArkType
  5. 7.1Ajv
  6. 6.2Joi
  7. 5.6class-validator
  8. 5.2Yup
  9. 3.9Superstruct
  10. 3.8io-ts
Compare all 10 on six scores