Zod 4

Schema validation.

Visit website ↗

Profile updated

Console’s review

· Reviewed by David Mytton

What we like

The new major version includes large performance improvements. New “Zod mini” specifically designed to be lightweight and more tree-shakable. Now supports file schemas, recursive objects, template literals, falsy and truthy strings. Migration from v3 uses subpaths within the same package version - a clever way to manage breaking changes.

Tradeoffs

Breaking changes in a major library are always disruptive, but lots of effort has gone into allowing support for v3 and v4 simultaneously.

Is Zod 4 a fit?

Based on Console’s review published on 2025-05-22. Summary updated .

Who it’s for

Developers who need schema validation with support for various features like file schemas and recursive objects

Why consider it

The tool provides large performance improvements

Keep in mind

The major version update may be disruptive due to breaking changes

Console is a free weekly newsletter with short reviews of developer tools, covering strengths and tradeoffs. This review reflects Console’s assessment at publication on 2025-05-22. Features and limitations may have changed since the review date. Read our selection criteria and learn about Console.

Earlier review

· Reviewed by David Mytton

What we like

Lightweight zero-dependency type validation for TypeScript (or JS) in Node or the browser. Gives you the power of types at runtime, not just when writing code e.g. checking responses from APIs or from user inputs. Supports complex types including datetimes, IP addresses, objects, functions, etc. Large ecosystem of uses e.g. JSON to Zod, Zod to OpenAPI.

Tradeoffs

The docs assume you know why you would want to use this, which isn’t completely clear until you experience the benefits.

Console is a free weekly newsletter with short reviews of developer tools, covering strengths and tradeoffs. This review reflects Console’s assessment at publication on 2023-06-01. Features and limitations may have changed since the review date. Read our selection criteria and learn about Console.

Discover your next favorite tool

Independent devtool reviews and the latest betas, in your inbox every Thursday. Free.