colinhacks/zod
TypeScript-first schema validation with static type inference
What it is
Zod is a TypeScript-first validation library. Define a schema and parse some data with it. You'll get back a strongly typed, validated result. 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
When to use it
Reach for zod when you are choosing the foundation of a web app — framework, router, bundler or data layer — it's written in TypeScript and fits stacks tagged runtime-validation, schema-validation, static-types, type-inference.