Zod 4 is now stable! Read the release notes here.
Featured sponsor: Jazz

Interested in featuring? Get in touch.
Introduction
Zod is a TypeScript-first validation library. Using Zod, you can define schemas you can use to validate data, from a simple string
to a complex nested object.
Features
- Zero external dependencies
- Works in Node.js and all modern browsers
- Tiny: 2kb core bundle (gzipped)
- Immutable API: methods return a new instance
- Concise interface
- Works with TypeScript and plain JS
- Built-in JSON Schema conversion
- Extensive ecosystem
Installation
Zod also publishes a canary version on every commit. To install the canary:
Requirements
Zod is tested against TypeScript v5.5 and later. Older versions may work but are not officially supported.
"strict"
You must enable strict
mode in your tsconfig.json
. This is a best practice for all TypeScript projects.
"moduleResolution"
Your "moduleResolution"
should be set to one of the following. The legacy "node"
and "classic"
modes are not supported, as they do not support subpath imports.
"node16"
(default if"module"
is set to"node16"
/"node18"
)"nodenext"
(default if"module"
is set to"nodenext"
)"bundler"
Sponsors
Sponsorship at any level is appreciated and encouraged. If you built a paid product using Zod, consider one of the corporate tiers.