Zod

TypeScript-first schema declaration and runtime validation with static type inference.

Zod lets you define a schema once and get both runtime validation and an inferred TypeScript type. It is widely used to validate forms, API inputs, environment variables and LLM outputs. Zod 4 improved performance and added a smaller 'mini' build.

Type
Library
Category
Web
Maintainer
Colin McDonnell
First released
2020
License
Open source (MIT)
Pricing
Open source
Level
Beginner
Technologies
typescript, javascript
GitHub stars
44,633
Weekly downloads
466,324,467 (npm)
Latest release
[object Object]
Last verified
26 Nov 2026

What Zod is used for

  • API input validation
  • Form validation
  • Parsing untrusted data
  • Structured LLM output

Strengths

  • Single source of truth for types and validation
  • Composable schemas
  • Huge ecosystem integration

Limitations

  • Runtime cost on very hot paths
  • Complex schemas can slow type checking

Zod alternatives

How it relates to other tools

Built with the same technologies

Official links

Sources

Explore