zod 4.6.5 vs valibot 1.5.0 on one nested user schema (uuid/email/age/tags/profile/enum). Warm medians after 2k warmup + 9×50k: zod.parse 1,144,494 ops/s vs valibot.parse 968,187 (~1.18×). safeParse fail: valibot 697,760 vs zod 415,523 (~1.7×). esbuild minify+gzip9: 452,999/92,636 B vs 85,126/15,422 B. Package trees ~6.1 MB vs ~1.9 MB. Fixture /workspace/bench-zod-valibot/.
4 min read
In a Valibot vs Zod test on one nested user schema, Zod 4.6.5 parsed valid input faster (1.14M vs 0.97M ops/s median, about 1.18x), while Valibot 1.5.0 was about 1.7x faster on invalid input (697,760 vs 415,523 ops/s). Valibot's bundle was far smaller at 15 KB vs 93 KB gzipped, so stay on Zod 4 for server-side APIs that already use it, and pick Valibot when client bundle size is the constraint.
export { z } from "zod" vs export * as v from "valibot", gzip -9.| Path | Median ops/s | Median ms / 50k |
|---|---|---|
| zod.parse ok | 1,144,494 | 43.7 |
| valibot.parse ok | 968,187 | 51.6 |
| zod.safeParse ok | 1,139,141 | 43.9 |
| valibot.safeParse ok | 979,417 | 51.1 |
| zod.safeParse fail | 415,523 | 120.3 |
| valibot.safeParse fail | 697,760 | 71.7 |
Same schema shape, same box. Happy-path parse favored Zod 4 here; invalid input favored Valibot. For lint/format cousins see Biome vs ESLint/Prettier and oxlint vs ESLint. For shipped JS weight, pair with size-limit vs bundlesize.
Yes, if the schema library lands in the browser. Minified ESM was 453 KB for Zod vs 85 KB for Valibot; gzip -9 was 93 KB vs 15 KB (~6×). Installed package trees were ~6.1 MB vs ~1.9 MB. Server-only validation can ignore that; a form-heavy SPA should not.
Treat this as one object schema on Node 22, not a claim that Zod is always faster. Fail-path and bundle still lean Valibot.
| Situation | My pick |
|---|---|
| Already on Zod 4 in a Node API | Stay on Zod |
| Browser bundle is tight | Valibot |
| Heavy invalid-input traffic | Valibot (faster fail path here) |
| Need the Zod ecosystem (resolvers, partners) | Zod |
| Auditing unused deps after a swap | Pair with knip vs depcheck |
| Comparing test runners beside schema tests | See Jest vs Vitest |
Bottom line: on 50k parses of one user object, Zod 4.6.5 hit 1.14M ops/s median while Valibot 1.5.0 hit 0.97M, but Valibot shipped a 15 KB gzip bundle against Zod’s 93 KB. Who should not switch: teams whose Zod schemas and partner libs already pass CI.
How this was made: I installed zod and valibot on the ShopperCove box, timed interleaved parse rounds after a warm-up, measured esbuild minify+gzip sizes, recorded JSON; the write-up was drafted with AI help and checked against that output.
Not on the success path in this test: Zod 4.6.5 hit 1,144,494 ops/s vs Valibot 1.5.0 at 968,187. On failing input Valibot's safeParse was faster, 697,760 vs 415,523 ops/s.
Minified ESM was 453 KB for Zod vs 85 KB for Valibot, and gzip -9 was 93 KB vs 15 KB (about 6x). Installed package trees were about 6.1 MB vs 1.9 MB.
Only if the schema library ships to the browser and bundle size matters, or you handle a lot of invalid input. A Node API already on Zod 4 has little reason to switch.
Lab evidence
Hands-on on ShopperCove box 6 Oct 2026 ~00:30–00:35 IST (8 vCPU Intel Xeon / 15 GB shared Linux, Node 22.20.0). zod 4.6.5 vs valibot 1.5.0. Fixture /workspace/bench-zod-valibot/: one object schema (uuid, email, int age 0–120, tags[], nested profile, enum role); good + bad payloads. 2,000 warm iterations then 9 rounds × 50,000. Medians: zod.parse ok 1,144,494 ops/s (43.7 ms/50k); valibot.parse ok 968,187 (51.6 ms); zod.safeParse ok 1,139,141; valibot.safeParse ok 979,417; zod.safeParse fail 415,523; valibot.safeParse fail 697,760. Disk trees ~6.1 MB zod vs ~1.9 MB valibot. esbuild minify ESM: 452,999 B vs 85,126 B; gzip -9 92,636 B vs 15,422 B. Raw: /workspace/bench-zod-valibot/res-zod-valibot.json + res-bundle.json. Not tested: Ajv, async pipes, TS compile time, Deno/Bun, edge, schema codegen. No affiliate.
Explore the product
Untested by us. Check what's included, the license and refund terms before you buy.