npm zod 4.0.0-beta.0
v4.0.0-beta

latest releases: 4.1.5, 4.2.0-canary.20250828T181323, 4.1.4...
5 months ago

Zod 4 is now in beta.

The repo now contains three separate packages:

  • zod
  • @zod/mini: a tree-shakable variant of Zod.
  • @zod/core: a library that implements logic/parsers shared between zod and @zod/mini.

During the beta period:

  • zod — published continuously to zod@next , e.g. zod@4.0.0-beta.20250410T214751
  • @zod/mini — published continuously to @zod/mini@next , e.g. @zod/mini@4.0.0-beta.20250410T214751
  • @zod/core — published to latest in the v.0x version range (initial development in semver)

To install/upgrade:

npm upgrade zod@next
npm install @zod/mini@next
npm install @zod/core

A note on versioning

For simplicity, additional beta will be continuously released as additional commits are made to the v4 branch.

After the beta:

  • stable versions of zod and @zod/mini will be released as 4.0.0. They will remain version-locked moving forward. They will be pinned to a specific @zod/core version.
  • @zod/core will be released as 1.0.0. It will not be version-locked to zod and @zod/mini. This gives those libraries the freedom to evolve their APIs independent of @zod/core. Moreover, @zod/core will likely serve as the underpinning for additional libraries in the future, so it may implement/modify code that isn't used by either zod or @zod/mini.

Don't miss a new zod release

NewReleases is sending notifications on new releases.