Zod · Method
.base64
z.base64() creates a Zod schema for validating base64 strings. When converted to JSON Schema, it becomes a string with contentEncoding: "base64".
Last updated
- Since
- Zod 4
Syntax
z.base64()In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
z.base64url()z.toJSONSchema()contentEncodingz.string()