Zod is a TypeScript-first library for schema validation with static type inference. It lets you define a schema, parse input data (throwing detailed errors or returning a safe result), and get a strongly typed validated result, useful for validating untrusted data in Node.js and modern browsers.
Project status
- Active maintenance is evident, with frequent recent GitHub updates (last upstream push on 2026-09-14) and multiple v4.6.x patches landing in mid-September 2026.
- Apparent update cadence is steady and relatively fast for a mature library, with several updates across just about 5 to 6 days in September 2026 (v4.6.1 through v4.6.5), suggesting ongoing development rather than a long pause.
AI summary generated
Recent updates
v4.6.5
v4.6.5 primarily tightens the TypeScript typing for `z.instanceof().properties()` by keying the accepted shape off the instance type. The diff also bumps package versions to 4.6.5 and updates the pnpm lockfile to reflect the new `zod` version for integration peer deps. No runtime logic changes are evident in the provided diff, but the type signature change can break existing TypeScript usage.
Featuresv4.6.4
v4.6.4 is a patch release that adds a new `z.currencyCode()` string format (backed by a vendored ISO 4217 alpha-code regex) and improves `z.url()` invalid-URL rejection performance using `URL.canParse`. It also includes a small internal performance refactor and a dev-dependency bump (next and vite).
Featuresv4.6.3
v4.6.3 is a patch release that corrects the behavior of `z.properties()` in the v4 API, reverting it back to being a check rather than a standalone schema. The release also updates documentation and example error messages to match the actual parser output.
Breakingv4.6.2
v4.6.2 is a small release focused on a fix to Zod's `prefault` behavior when the fallback value (or transformed output) is `undefined`, especially inside object schemas. The diff updates both runtime object key assembly and TypeScript typing behavior to ensure `undefined` outputs are preserved rather than causing keys to be dropped.
v4.6.1
v4.6.1 is a patch release on top of v4.6.0 that includes a fix for discriminated unions involving defaulted discriminators, plus improved TypeScript behavior for recursive object index inference. It also adds a new Tajik (tg) error locale and adjusts the release CI to improve npm publish wait reliability.
Featuresv4.6.0
Zod v4.6.0 introduces several new validation and schema-conversion capabilities, including a new fast boolean validation API (.validate), object instance-preserving property validation (z.properties), and stricter JSON Schema keyword support in fromJSONSchema. The release also improves CommonJS performance, fixes recursive-schema memory retention, and includes multiple bug fixes and behavior changes around error construction, enum options, and regex patterns.
BreakingFeaturesv4.5.4
Release v4.5.4 focuses on fixing cycle detection behavior in Zod's runtime memoizer. The documented intent is to stop the cycle-walking logic from triggering default factories, which can cause unintended side effects.
v4.5.3
v4.5.3 primarily updates documentation and adds a fix for JSON schema generation in Zod v4. The core change ensures that numeric keys produced by `z.record(...)` are represented as JSON strings in `toJSONSchema`, with substantial new test coverage around the exact emitted `propertyNames` and `required` shapes.
Breakingv4.5.2
This release is primarily a Zod v4 internal fix to improve compatibility with vitest spyOn when detaching or wrapping prototype methods, plus a set of documentation and website layout adjustments. It also removes canary publishing from the release workflow and makes a docs hydration change by disabling ISR for the docs route.
v4.5.1
v4.5.1 is a patch release with changes focused on CI/publishing reliability. The main code change is the internal Zod version metadata being updated from 4.5.0 to 4.5.1, along with a workflow update that waits for the npm registry to actually serve the published version before proceeding.
v4.5.0
Zod v4.5.0 introduces `z.compile(schema)` to pre-compile schemas into a fast validation path (and optional global auto-compilation via `zod/compile`). The release also adds several new schema helpers and performance-focused changes, including `z.validate()` and major reductions in schema memory footprint, plus a set of soundness fixes that may cause previously accepted inputs to be rejected.
BreakingFeaturesv4.4.3
v4.4.3 primarily changes Zod v4 optionality semantics around missing (absent) object keys, specifically restoring and generalizing how $ZodCatch, $ZodTransform, and $ZodPreprocess behave when input is undefined. The patch also includes related test updates and internal plumbing to propagate a new fallback marker through parsing, plus some unrelated documentation and sponsor website changes.
v4.4.2
v4.4.2 includes mostly documentation and type-level tightening related to discriminated unions and preprocess behavior. On the code side, it introduces an explicit ZodPreprocess schema type and adjusts JSON Schema generation logic for pipes/codecs and transforms.
v4.4.1
v4.4.1 is a small patch release focused on CI/release gating and a behavioral fix in Zod v4 tuple parsing around optional-output handling. The tuple change affects when parsing should truncate and swallow issues versus when it must reject earlier absent-optional “holes” before later required defaults can materialize output.
Breakingv4.4.0
Zod v4.4.0 is a minor release focused on correctness and soundness fixes, including several intentionally stricter behaviors that may require small input or schema adjustments. It also includes performance work for schema method allocation and tree-shaking, plus multiple JSON Schema conversion and error-formatting improvements.
BreakingSecurityFeaturesv4.3.6
v4.3.6 is a small patch release focused on Zod behavior and build ecosystem cleanups. The code diff includes changes to numeric key handling for record-like schemas and an adjustment to JSON schema generation around `$ref` handling, plus several non-functional repo/doc/workflow updates.
v4.3.5
Release v4.3.5 is primarily a documentation update plus a small internal change aimed at improving mini treeshaking. The package version metadata is also bumped from 4.3.4 to 4.3.5 across Zod package manifests.
v4.3.4
v4.3.4 focuses on improving Zod JSON Schema generation for `z.looseRecord` with regex key patterns, and adds new integration test coverage for external tooling. It also includes a breaking TypeScript typing change by removing `.refine()` from `ZodMiniType`, and updates `fromJSONSchema` behavior per the release notes.
BreakingFeaturesv4.3.3
Release v4.3.3 bumps the published package versions from 4.3.2 to 4.3.3. The only substantive code change in the diff is a TypeScript typing adjustment to ZodType.refine when passed a type guard function.
v4.3.2
Release v4.3.2 mainly changes how Zod computes results for intersections, specifically loosening behavior around strict object validation. Documentation also removes a sponsor entry (Juno) from the docs UI, and the package version is bumped to 4.3.2.
Breaking