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"
Ecosystem
Zod has a thriving ecosystem of libraries, tools, and integrations. Refer to the Ecosystem page for a complete list of libraries that support Zod or are built on top of it.
I also contribute to the following projects, which I'd like to highlight:
- tRPC - End-to-end typesafe APIs, with support for Zod schemas
- React Hook Form - Hook-based form validation with a Zod resolver
- zshy - Originally created as Zod's internal build tool. Bundler-free, batteries-included build tool for TypeScript libraries. Powered by
tsc
.
Sponsors
Sponsorship at any level is appreciated and encouraged. If you built a paid product using Zod, consider one of the corporate tiers.