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

Interested in featuring?Get in touch.
Introduction
Zod is a TypeScript-first validation library. Using Zod, you can defineschemas you can use to validate data, from a simplestring to a complex nested object.
import * as zfrom "zod";const User = z.object({ name: z.string(),});// some untrusted data...const input = {/* stuff */ };// the parsed result is validated and type safe!const data = User.parse(input);// so you can use it with confidence :)console.log(data.name);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
npm install zodZod is also available as@zod/zod onjsr.io.
Zod provides an MCP server that can be used by agents to search Zod's docs. To add to your editor, followthese instructions. Zod also provides anllms.txt file.
Requirements
Zod is tested againstTypeScript v5.5 and later. Older versions may work but are not officially supported.
"strict"
You must enablestrict mode in yourtsconfig.json. This is a best practice for all TypeScript projects.
// tsconfig.json{ // ... "compilerOptions": { // ... "strict":true }}Ecosystem
Zod has a thriving ecosystem of libraries, tools, and integrations. Refer to theEcosystem 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 aZod 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 thecorporate tiers.



