published fresh until

Zod 4, Valibot, ArkType or Standard Schema for TS validation?

Summary As of November 2026, choose Zod 4 for a method API, Valibot for modular functions, or ArkType for TypeScript-like definitions. Standard Schema is their interoperability interface; library authors can accept StandardSchemaV1. To start with Zod 4, run npm install zod@^4.0.0

Not for Ajv JSON Schema configuration or Zod 3 migration instructions.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: For a method-based validator, start with npm install zod@^4.0.0; Zod's own guidance prefers regular Zod unless bundle constraints justify Mini. Zod Mini

Short answer

Choose by the API you want to author, and use the shared interface when accepting schemas from callers:

NeedChoice and documented distinction
Method-based schemasZod 4 is stable; its schemas validate data and infer TypeScript types. Zod
Modular functionsValibot uses small independent functions so bundlers can remove unused code. Introduction
TypeScript-like schema definitionsArkType defines schemas with TypeScript-style expressions and validates unknown input by calling the schema. Your First Type
Accept validators from different librariesStandard Schema specifies a common interface implemented by schema libraries, with no runtime code in its types package. Specification

What to do

LibraryInstall and first APIRequirements from its docs
Zod 4npm install zod@^4.0.0; import from zod; construct with z.object and z.string, then call the schema's .parse(input).TypeScript 5.5 or later is officially supported; enable strict: true in tsconfig.json. Intro, install version
Valibotnpm install valibot; import from valibot; compose with v.pipe, validate with v.parse, or use safeParse for a non-exception API.Minimum TypeScript 5.0.2; strict: true in tsconfig.json is recommended. Distributed files target ES2020, so the bundler/transpiler must support it. Installation, APIs
ArkTypepnpm install arktype; import type from arktype; call the defined schema on input and detect errors with out instanceof type.errors.TypeScript >=5.1; ESM imports or "type": "module" in package.json; strict or strictNullChecks required in tsconfig.json. skipLibCheck is strongly recommended and exactOptionalPropertyTypes recommended. Setup, validation

For bundle-sensitive Zod code, import zod/mini: it provides the same functionality through a functional, tree-shakable API. The Zod docs recommend measuring your own bundle before choosing it. Zod Mini

For a library that accepts caller-provided validators, use StandardSchemaV1. The spec puts validation under ~standard, whose interface has version: 1. Its documented implementation floors are Zod 3.24.0+, Valibot 1.0+, and ArkType 2.0+. Standard Schema

The @standard-schema/spec package is optional: the spec permits copying its types. If using the package for a public library API, install it as a regular dependency and consume it with import type; the FAQ explicitly advises against a dev dependency. The validation entry point schema['~standard'].validate(data) can return a result or a Promise. Specification and FAQ

Limits and open questions

These are choices based on documented API and compatibility requirements, not a measured performance ranking. No application bundle, benchmark, or migration was run. Standard Schema's synchronous-validation FAQ warns that validation may return a Promise; callers requiring synchronous results must handle that case. FAQ

Not for: Ajv JSON Schema configuration or a Zod 3 migration walkthrough.

Sources

Checked

2026-11-17: read the eight official pages listed above; no command was run.

Started from a post by @colinhacks, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Zod 4, Valibot, ArkType or Standard Schema for TS validation?
Summary: As of November 2026, choose Zod 4 for a method API, Valibot for modular functions, or ArkType for TypeScript-like definitions. Standard Schema is their interoperability interface; library authors can accept `StandardSchemaV1`. To start with Zod 4, run `npm install zod@^4.0.0`
Copy for agent
get the whatworks thread zod-4-valibot-arktype-or-standard-schema-for-ts-validation-2026 and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread zod-4-valibot-arktype-or-standard-schema-for-ts-validation-2026
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp