# Zod v4.5.0 - Product: Zod (https://whatsnew.fyi/product/zod) - Vendor: Colin McDonnell - Date: 2026-08-28 - Version: v4.5.0 - Original notes: https://github.com/colinhacks/zod/releases/tag/v4.5.0 - Permalink: https://whatsnew.fyi/product/zod/releases/v4.5.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **added** — Add z.compile() function to pre-compile Zod schemas for dramatically faster parsing performance, achieving 3-7x speedup on objects, arrays, and unions - **added** — Add z.creditCard() validator for 12-19 digit credit card numbers with Luhn checksum verification - **added** — Add z.properties() function as the multi-property counterpart to z.property() - **added** — Add z.deepPartial() and z.exactPartial() functions for partial schema variants - **added** — Add z.validate() boolean function for fast-path validity checking without full parse, up to 16x faster on invalid data - **added** — Add support for 8 new locales: Bengali (bn), Central Kurdish (ckb), Hindi (hi), Kannada (kn), Norwegian Nynorsk (nn), Brazilian Portuguese (pt-BR), Slovak (sk), and Turkmen (tk) - **changed** — Reduce schema memory footprint by 9x Zod 4.5 is now available. ```sh npm install zod@latest ``` At a glance: - [`z.compile()`](#zcompile) — the flagship feature of Zod 4.5 - [`z.creditCard()`](#zcreditcard) — 12–19 digits plus Luhn checksum - [`z.properties()`](#zproperties) — the multi-property counterpart to `z.property()` - [`z.deepPartial()`](#zdeeppartial)/[`.exactPartial()`](#exactpartial) - [`z.validate(): boolean`](#zvalidate) — a fast-path to verify input validity without a full parse (up to 16x faster on invalid data) - [9x reduction in memory footprint](#9x-reduction-in-schema-memory-footprint) - [New locales](https://zod.dev/error-customization#locales): Bengali (`bn`), Central Kurdish (`ckb`), Hindi (`hi`), Kannada (`kn`), Norwegian Nynorsk (`nn`), Brazilian Portuguese (`pt-BR`), Slovak (`sk`), Turkmen (`tk`) ##### `z.compile()` You can now pre-compile any Zod schema using `z.compile(schema)`. This dramatically speeds up parsing performance. ```ts import * as z from "zod"; const Player = z.object({ username: z.string(), bio: z.string(), xp: z.number() }); const CompiledPlayer = z.compile(Player); ``` A compiled schema can be used *exactly* like an uncompiled one. There are no special rules around compiled schemas. They're just faster. ```ts Player.parse({ ... }); CompiledPlayer.parse({ ... }); // ~2x faster ``` On objects, arrays, and unions, this speeds up parsing by a factor of ~3–7. More complex schemas stand to benefit more than simpler ones. Time per parse on a shared nanosecond axis, standard parser as a gray bar with the compiled time as a blue bar inside it: an array of 10 objects 377 ns to 68 ns (5.5x), a 20-key object 301 ns to 38 ns (7.8x), an array of 10 strings 241 ns to 33 ns (7.3x), a union of 3 objects 190 ns to 36 ns (5.3x), a 3-element tuple 119 ns to 33 ns (3.6x), a 5-key strict object 117 ns to 32 ns (3.7x), a discriminated union 92 ns to 27 ns (3.4x), a 5-key object 76 ns to 28 ns (2.8x); up to 7.8x faster when compiled *Time per parse by schema type, standard parser vs compiled — lower is better ([benchmark](https://github.com/colinhacks/zod/blob/main/packages/bench/compile-matrix.ts))* Below are the Moltar benchmark results comparing Zod (compiled and uncompiled) against the [**Moltar ParseSafe**](https://github.com/moltar/typescript-runtime-type-benchmarks) bench. Bar chart of operations per second on the moltar benchmark fixture, parseSafe category: Zod 4 compiled 47.5M, typia 45.3M, Zod 4 11.6M, valibot 1.8M, effect 1.7M, Zod 3 1.2M, arktype 152k, yup 121k *Throughput on the moltar benchmark fixture (parseSafe: returns a new object with unknown keys stripped) — higher is better ([benchmark](https://github.com/moltar/typescript-runtime-type-benchmarks/pull/2329))* And the equivalent results for the Moltar AssertLoose bench. Tested against the new `z.validate(schema, input)` function (detailed later in the post). Bar chart of operations per second on the moltar benchmark fixture, assertLoose category: typia 74.9M, arktype 66.2M, Zod 4 compiled 60.6M, Zod 4 6.5M, valibot 1.9M, effect 1.7M, Zod 3 1.2M, yup 124k *Throughput on the moltar benchmark fixture (assertLoose: returns a boolean, unknown keys allowed) — higher is better ([benchmark](https://github.com/moltar/typescript-runtime-type-benchmarks/pull/2329))* Zod's entire test suite runs twice—once normally and again with auto-compilation enabled globally—to ensure perfect fidelity.