Zod

Best for: Validating API input and forms in TypeScript

Overview

TypeScript-first schema validation: define a schema once, validate data at runtime, and get the TypeScript type from it.

Strengths

  • Types and validation from one schema
  • Supported by many frameworks

Drawbacks

  • Larger bundle than some alternatives

Alternatives to Zod

See all 13 →

MDN Web Docs

Learning and looking up web basics
Free

Mozilla's reference and free course for HTML, CSS and JavaScript. The standard place to check how a web API or language feature actually works.

The Modern JavaScript Tutorial

Understanding JavaScript properly
Free

Free, in-depth JavaScript tutorial (javascript.info) from basics to closures, prototypes, promises and async, with exercises after each chapter.

TypeScript Handbook

Learning TypeScript
Free

The official TypeScript guide to types, narrowing, generics and modules. Pair it with the online Playground to try examples.