Zod, the TypeScript schema validation library, released version 4.5 on August 28, 2026. This version introduced z.compile(), which transforms any schema into a precompiled validator. This compilation process occurs in-process, not at build time, and can parse data three to nine times faster than before. The compiled schema functions identically to the original.
Version 4.5 also brought a significant reduction in memory usage. A bare z.string() now uses 784 bytes of heap, down from 7.5kb, representing a nine-fold decrease. Additionally, safeParse() now skips stack-trace capture on failure, making the rejection of invalid input approximately 7.5 times more efficient.
Beyond performance improvements, Zod 4.5 restored z.deepPartial() and added .exactPartial(), z.creditCard(), z.input()/z.output(), support for cyclical data in recursive schemas, and eight new error locales. These additions expand the library's functionality and internationalization capabilities.
Zod 4.6 followed on September 9, extending the work from 4.5. A key addition is .validate(), a boolean-only check that avoids constructing a parsed result or ZodError, stopping at the first issue. With compilation enabled, this can be up to 35 times faster than .safeParse().success on invalid input. This version also added property validation on class instances, six validation keywords in z.fromJSONSchema(), and z.iban().
Crucially, Zod 4.6 addressed a memory regression introduced in 4.5 that could lead to out-of-memory failures when dealing with recursive schemas by retaining parsed data.
For environments where Content Security Policy (CSP) blocks the new Function used by z.compile(), Zod 4.6 introduced z.withParser(). This allows for the installation of an externally generated parser, providing a workaround for CSP restrictions without generating the parser itself.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
Zod, a TypeScript schema validation library, released versions 4.5 and 4.6, adding in-process schema compilation for faster parsing and significantly reducing memory footprint. These updates improve performance and memory efficiency for schema validation in TypeScript applications.