
About Zod
Zod is an open source TypeScript library for validating data against schemas. It also infers the matching static types, so your code stays in sync with your checks.
What it does
You define a schema with simple building blocks such as strings, numbers and nested objects. Calling parse on untrusted input either returns a typed value or throws an error. Schemas can also be converted to JSON Schema, and error messages can be customized.
Key features
- Define schemas for simple values and nested objects
- Infer TypeScript types from each schema
- Parse untrusted input safely
- Convert schemas to JSON Schema
- Works in Node.js and modern browsers
Who it's for
TypeScript developers who validate API input, form data or configuration files. It is also used by library authors who need typed validation inside their own packages.
Pricing and good to know
The library is free and released under the MIT license. It has no external dependencies and a small core bundle. The docs recommend enabling strict mode in tsconfig, and the library is tested against TypeScript 5.5 and later.
Highlights
- Define schemas for simple values and nested objects
- Infer TypeScript types from each schema
- Parse untrusted input safely
- Convert schemas to JSON Schema
- Works in Node.js and modern browsers












