Zod

zod.dev

Visit Website

A TypeScript-first schema declaration and validation library that infers static types from runtime schemas — eliminating the need to maintain both a TypeScript type and a separate runtime validator.

Why it is useful

The standard approach in TypeScript projects for validating untrusted data — API responses, form inputs, environment variables — while keeping types in sync automatically. The composable API is readable, and error messages are precise enough for production use. Nearly every serious TypeScript project today uses Zod or something heavily inspired by it. The v4 rewrite is dramatically faster.