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 betweenzod
and@zod/mini
.
During the beta period:
zod
— published continuously tozod@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 tolatest
in thev.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 as4.0.0
. They will remain version-locked moving forward. They will be pinned to a specific@zod/core
version. @zod/core
will be released as1.0.0
. It will not be version-locked tozod
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 eitherzod
or@zod/mini
.