Packages

zod

4.6.7 · 12 Oct 2026MIT468.6M / weekRepositoryHomepagenpmAtom feed

Your version

4.0.0

major9 Jul 2025Where it was published

4.6.7 is the newest release of 4.x.

Summary· from the note as AI read it

To checkNothing breaks, but check what is deprecated or unsure.

Before you upgrade

  • Root 'zod' import now resolves to Zod 4; migrate code still using Zod 3 APIsTo check

In short

1 breaking

  • Breaking

    With this release, zod@4.0.0 has been published to npm. There were no code changes between 3.25.76 and 4.0.0!

    To check

Security

1 advisory affects 4.0.0; 4.6.6 fixes them

Release note

With this release, zod@4.0.0 has been published to npm. There were no code changes between 3.25.76 and 4.0.0!

Zod 4 has been stable for the past 6 weeks, but it was published inside zod@3.25.x on npm. this transitionary window gave the ecosystem time to incrementally support for Zod 4 (without dropping support for Zod 3). As there is now near-universal support for Zod 4 in the ecosystem, ths time feels right to finally put a bow on things 🎀

To upgrade to Zod 4:

npm upgrade zod@^4.0.0

If you’ve already migrated to Zod 4 using the subpaths, there are no changes required. however you can optionally simplify your imports (recommended)

// after upgrading to zod@4.0.0:
import * as z from "zod"; // Zod 4 (regular)
import * as z from "zod/mini" // Zod 4 Mini

// these still work, but are no longer needed 
import * as z from "zod/v4"; 
import * as z from "zod/v4-mini":

// if you still need Zod 3
import * as z from "zod/v3"; // Zod 3

Library authors — if you've already implemented Zod 4 support according to the best practices outlined in the Library authors guide, bump your peer dependency to include zod@^4.0.0:

// package.json
{
  "peerDependencies": {
    "zod": "^3.25.0 || ^4.0.0"
  }
}

There should be no other code changes necessary. No code changes were made between the latest 3.25.x release and 4.0.0. This does not require a major version bump.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.