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.
You must enable strict mode in your tsconfig.json. This is a best practice for all TypeScript projects.
The legacy "moduleResolution": "node" and "moduleResolution": "classic" modes are not supported. Your "moduleResolution" should be set to one of the following:
"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.


