Zod 4 is now in beta! Click here to read the release notes.
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
Requirements
Zod is tested against TypeScript v5.5 and later. Older versions may work but are not officially supported.
You must enable strict
mode in your tsconfig.json
. This is a best practice for all TypeScript projects.
Installation
Zod also publishes a canary version on every commit. To install the canary:
Sponsors
Sponsorship at any level is appreciated and encouraged. If you built a paid product using Zod, consider one of the corporate tiers.
Platinum
Gold
Silver
Bronze