Skip to Content
docsWhat Is Zod

Last Updated: 3/12/2026


What is Zod?

Zod is a TypeScript-first schema validation library. Using Zod, you can define schemas to validate data, from a simple string to a complex nested object. When you parse data with a Zod schema, you get back a strongly-typed, validated result.

import * as z from "zod"; const User = z.object({ name: z.string(), }); // some untrusted data... const input = { /* stuff */ }; // the parsed result is validated and type safe! const data = User.parse(input); // so you can use it with confidence :) console.log(data.name);

Why Zod?

Zod is built for TypeScript developers who need runtime validation that stays in sync with their types. Unlike other validation libraries, Zod infers static TypeScript types directly from your schema definitions — no need to define types separately.

Key Features

  • Zero external dependencies — Zod has no dependencies, keeping your bundle small
  • Works everywhere — Node.js and all modern browsers
  • Tiny — 2kb core bundle (gzipped)
  • Immutable API — Methods return a new instance, making schemas composable
  • Concise interface — Define complex schemas with minimal code
  • Works with plain JavaScript — TypeScript is optional
  • Built-in JSON Schema conversion — Export your schemas as JSON Schema
  • Extensive ecosystem — Integrations with popular frameworks and libraries

Who Should Use Zod?

Zod is ideal for:

  • API validation — Validate incoming requests and responses
  • Form validation — Validate user input in web applications
  • Configuration validation — Ensure config files match expected schemas
  • Data transformation — Parse and transform data with type safety
  • Type inference — Generate TypeScript types from runtime schemas

What’s Next

  • Installation — Get started by installing Zod in your project
  • Basic Usage — Learn the fundamentals of defining and using schemas