Zod logo

生态系统

注意 — 为了避免臃肿和混乱,随着 Zod 4 的发布,生态系统部分已被彻底清理。如果你已经更新了你的库以支持 Zod 4,请提交 PR 将其重新添加。对于支持 Zod 3 的库,请参考 v3.zod.dev

越来越多的工具是基于 Zod 构建的或原生支持 Zod!如果你在 Zod 之上构建了一个工具或库,请通过 Twitter开始讨论 告诉我。我会把它添加到下面并发推文分享。

🌐 There are a growing number of tools that are built atop or support Zod natively! If you've built a tool or library on top of Zod, let me know on Twitter or start a Discussion. I'll add it below and tweet it out.

资源

🌐 Resources

API 库

🌐 API Libraries

NameStarsDescription
tRPC⭐️ —Build end-to-end typesafe APIs without GraphQL.
GQLoom⭐️ —Weave GraphQL schema and resolvers using Zod.
oRPC⭐️ —Typesafe APIs Made Simple
Express Zod API⭐️ —Build Express-based API with I/O validation and middlewares, OpenAPI docs and type-safe client.
nestjs-zod⭐️ —Integrate nestjs and zod. Create nestjs DTOs using zod, serialize with zod, and generate OpenAPI documentation from zod schemas
Zod Sockets⭐️ —Socket.IO solution with I/O validation, an AsyncAPI generator, and a type-safe events map.
Zod JSON-RPC⭐️ —Type-safe JSON-RPC 2.0 client/server library using Zod.
upfetch⭐️ —Advanced fetch client builder

表单集成

🌐 Form Integrations

NameStarsDescription
regle⭐️ —Headless form validation library for Vue.js.
conform⭐️ —A type-safe form validation library utilizing web fundamentals to progressively enhance HTML Forms with full support for server frameworks like Remix and Next.js.
Superforms⭐️ —Making SvelteKit forms a pleasure to use!
zod-validation-error⭐️ —Generate user-friendly error messages from ZodError instances.
svelte-jsonschema-form⭐️ —Svelte 5 library for creating forms based on JSON schema.
frrm⭐️ —Tiny 0.5kb Zod-based, HTML form abstraction that goes brr.
react-f3⭐️ —Components, hooks & utilities for creating and managing delightfully simple form experiences in React.

Zod 到 X

🌐 Zod to X

NameStarsDescription
zod-openapi⭐️ —Use Zod Schemas to create OpenAPI v3.x documentation
fastify-zod-openapi⭐️ —Fastify type provider, validation, serialization and @fastify/swagger support for Zod schemas
zod2md⭐️ —Generate Markdown docs from Zod schemas
prisma-zod-generator⭐️ —Generate Zod schemas from Prisma schema with full ZodObject method support
@traversable/zod⭐️ —Build your own "Zod to x" library, or pick one of 25+ off-the-shelf transformers
zod-to-mongo-schema⭐️ —Convert Zod schemas to MongoDB-compatible JSON Schemas effortlessly
convex-helpers⭐️ —Use Zod to validate arguments and return values of Convex functions, and to create Convex database schemas

X 到 Zod

🌐 X to Zod

NameStarsDescription
orval⭐️ —Generate Zod schemas from OpenAPI schemas
kubb⭐️ —The ultimate toolkit for working with APIs.
Hey API⭐️ —The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.
valype⭐️ —Typescript's type definition to runtime validator (including zod).
Prisma Zod Generator⭐️ —Generates Zod schemas with input/result/pure variants, minimal/full/custom, selective emit/filtering, single/multi-file output, @zod rules, relation depth guards.
DRZL⭐️ —Drizzle ORM toolkit that can generate Zod validators from schema(s), plus typed services and strongly typed routers (oRPC/tRPC/etc).
convex-helpers⭐️ —Generate Zod schemas from Convex validators
Hono Takibi⭐️ —Hono Takibi is a code generator from OpenAPI to @hono/zod-openapi

模拟库

🌐 Mocking Libraries

NameStarsDescription
zod-schema-faker⭐️ —Generate mock data from zod schemas. Powered by @faker-js/faker and randexp.js.
zocker⭐️ —Generates valid, semantically meaningful data for your Zod schemas.
@traversable/zod-test⭐️ —Random zod schema generator built for fuzz testing; includes generators for both valid and invalid data

由 Zod 提供支持

🌐 Powered by Zod

NameStarsDescription
zod-config⭐️ —Load configurations across multiple sources with flexible adapters, ensuring type safety with Zod.
Composable Functions⭐️ —Types and functions to make composition easy and safe.
zod-xlsx⭐️ —A xlsx based resource validator using Zod schemas for data imports and more
bupkis⭐️ —Uncommonly extensible assertions for the beautiful people
Fn Sphere⭐️ —A Zod-first toolkit for building powerful, type-safe filter experiences across web apps.
zodgres⭐️ —Postgres.js + Zod: Database collections with static type inference and automatic migrations

Zod 实用程序

🌐 Zod Utilities

NameStarsDescription
babel-plugin-zod-hoist⭐️ —Babel plugin that optimizes Zod performance by hoisting schema definitions to the top of the file, avoiding repeated initialization overhead.
eslint-plugin-import-zod⭐️ —ESLint plugin to enforce namespace imports for Zod.
zod-playground⭐️ —Interactive playground for testing and exploring Zod and Zod mini schemas in real-time.
eslint-plugin-zod-x⭐️ —ESLint plugin that adds custom linting rules to enforce best practices when using Zod
Zod Compare⭐️ —A utility library for recursively comparing Zod schemas.
zod-ir⭐️ —Comprehensive validation for Iranian data structures (National Code, Bank Cards, Sheba, Crypto, etc) with smart metadata extraction (Bank Names, Logos). Zero dependencies.

On this page