Package Manager Installation
Install Zod using your preferred package manager:Requirements
Zod requires TypeScript 4.5+ for the best experience. You can use Zod with plain JavaScript, but you’ll miss out on static type inference.
- TypeScript: 4.5 or higher (recommended)
- Node.js: Works with all modern versions
- Browsers: Works in all modern browsers
Runtime-Specific Setup
Node.js
Zod works out of the box with Node.js. Just import it in your code:Deno
You can import Zod directly from npm in Deno:Bun
Bun has native support for npm packages:Verify Installation
Create a simple test file to verify Zod is installed correctly:test.ts
Next Steps
Quick Start Tutorial
Learn the fundamentals with a hands-on tutorial