# colinhacks/zod

TypeScript-first schema validation with static type inference

Repository: https://github.com/colinhacks/zod
Canonical: https://ross.abutalabs.com/products/zod
Homepage: https://zod.dev
Language: TypeScript
License: MIT
License Family: permissive
Topics: typescript, schema-validation, type-inference, runtime-validation, static-types
Last push: 2026-08-27T00:37:15+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 70, longevity 100
- inputs: {"age_days": 2370, "days_push": 7, "days_rel": 121, "gap_med": 0.0, "n_releases_24m": 115}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 43535, forks 2147 (observed 2026-08-28T04:12:09.056814+00:00)

## What it is
Zod is a TypeScript-first schema validation library for defining and validating data structures at runtime with static type inference. It has zero dependencies, a tiny 2kb core, works in Node.js and browsers, and includes built-in JSON Schema conversion.

## Use cases
- validate untrusted API request bodies in TypeScript
- parse and type-check environment variables
- validate form input with type-safe schemas
- infer static TypeScript types from runtime schemas
- convert schemas to JSON Schema for OpenAPI docs
- validate data from external JSON sources
- build end-to-end typesafe APIs with tRPC

## When to choose
- you use TypeScript and want runtime validation that stays in sync with static types
- you need a small, dependency-free validation library for Node or browsers
- you want JSON Schema generation or a rich validation ecosystem (tRPC, form libraries)

## When to avoid
- your project is plain JavaScript without TypeScript and you don't need type inference
- you need extremely high-throughput validation where a compiled/AOT validator outperforms an interpreter
- you're locked to TypeScript versions older than 5.5

## Facets
- artifact type: library
- maturity: stable
- function: serialization, type-system, developer-tools
- domain: web-development, developer-tools, apis
- platform: browser, bun, cross-platform
- tags: schema-validation, runtime-validation, static-type-inference, -schema, typescript-first, form-validation, env-validation, nodejs, deno, typescript

## Member repositories
- colinhacks/zod (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:12:09.056814+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:22:26.332660+00:00, confidence not recorded.
  - readme: https://github.com/colinhacks/zod (fetched 2026-08-28T04:12:09.056814+00:00, sha 439c0c93c68f)
  - homepage: https://zod.dev (fetched 2026-08-29T07:46:12.177119+00:00, sha e9a1c0e76f78)
  - site_page: https://zod.dev?id=features (fetched 2026-08-29T07:46:12.188842+00:00, sha e9a1c0e76f78)
  - site_page: https://zod.dev?id=installation (fetched 2026-08-29T07:46:12.190691+00:00, sha e9a1c0e76f78)
  - site_page: https://zod.dev/v4/changelog (fetched 2026-08-29T07:46:12.186246+00:00, sha 4f5b99701b7e)
  - site_page: https://zod.dev/ecosystem?id=form-integrations (fetched 2026-08-29T07:46:12.192575+00:00, sha 47cbbe39f641)
- Data as of 2026-08-30T08:39:29.467469+00:00.
