# 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 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.
*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).
*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.