github arktypeio/arktype arktype@3.0.0
ArkType 3.0.0

latest releases: arkregex@0.0.17, @ark/fast-check@0.0.23, @ark/attest@0.59.1...
one hour ago

TypeScript's smallest, fastest validator. One prompt away.

Read the full announcement: Announcing ArkType 3.0

Precompile with @ark/aot

ArkType 3.0 compiles your existing type() definitions into standalone plain JS at build time with zero runtime parser and zero eval or new Function (strict CSP and Cloudflare Workers ready). Dynamic type() still runs with no build step.

Default precompiled build vs Zod 4:

  • 15x faster validation (median across 32 scenarios; #1 on public speed benchmarks at 658 vs Typia's 2,097 instructions/validation)
  • 21x smaller bundles (1.21 kB vs 25.1 kB gzipped on Valibot's login form, smaller than Valibot's 1.56 kB; use preset: "smallest" for schema-heavy frontends)
  • 63x lighter startup (0.69M vs 43.72M CPU instructions on the login app)

Supports Vite, esbuild, webpack, Rspack, Rolldown, Rollup, Bun, Next.js (Turbopack & webpack), plus Node and Bun runtime drivers. See the precompile docs.

Try it or migrate from Zod

# audit a repo for precompilation
npx arktype check

# install the official agent skill to one-shot a Zod migration
npx skills add arktypeio/arktype

Also in 3.0

  • Codecs: bidirectional .encode() via arktype/codecs (0 B if unused), precompiled with @ark/aot
  • i18n: built-in en / de and custom locales via arktype/i18n (dynamic mode)
  • Errors as data: out.issues is a plain array of structured objects with path-free issue.message
  • Standard JSON Schema & fromJsonSchema(): built into arktype, auto-baked by @ark/aot
  • Cross-editor support (4 of 5 live): conformance-tested highlighting & inline errors across VS Code, JetBrains IDEs (arktype.io), and Neovim 0.11+, plus Helix Tree-sitter highlighting (Zed in marketplace review)

Upgrading & changelogs

See the 2.x to 3.0 upgrade guide for breaking changes (including ArkErrors and dynamic bundle size at 120 kB gz).

Package changelogs: arktype · @ark/aot · arkregex · @ark/attest · @ark/fast-check

Don't miss a new arktype release

NewReleases is sending notifications on new releases.