Zod 4 has been released, offering faster and more tsc-efficient performance along with several new features. It introduces improvements such as optimized parsing speeds, reduced tsc instantiations, and a smaller bundle size. Notable new capabilities include Zod Mini for strict bundle size projects, internationalization API,
Table of contents
VersioningWhy a new major version?Benchmarks100x reduction in tsc instantiations2x reduction in core bundle sizeIntroducing Zod MiniMetadataJSON Schema conversionRecursive objectsFile schemasInternationalizationError pretty-printingTop-level string formatsTemplate literal typesNumber formatsStringboolSimplified error customizationUpgraded z.discriminatedUnion()Multiple values in z.literal()Refinements live inside schemasAn extensible foundation: zod/v4/coreWrapping upSort: