Last Updated: 3/12/2026
Installation
Zod is available on npm and works in Node.js and all modern browsers. Install it using your preferred package manager.
npm
npm install zodpnpm
pnpm install zodyarn
yarn add zodbun
bun add zodJSR (Deno and other runtimes)
Zod is also available as @zod/zod on jsr.io :
deno add @zod/zodOr import directly:
import * as z from "jsr:@zod/zod";Requirements
Zod is tested against TypeScript v5.5 and later. Older versions may work but are not officially supported.
Enable strict Mode
You must enable strict mode in your tsconfig.json. This is a best practice for all TypeScript projects:
{
"compilerOptions": {
"strict": true
}
}Without strict mode, Zod’s type inference may not work correctly.
Bundle Size
Zod’s core bundle is just 2kb gzipped, making it ideal for both server and client-side applications.
What’s Next
- Basic Usage — Learn how to define your first schema and parse data
- Defining Schemas — Explore the different schema types Zod provides