decode_base64

decode_base64(str: string, [urlSafe: const bool]?, [ignorePadding: const bool]?) -> string

Decodes a Base64-encoded string into binary data represented as a UTF-8 string.

Optional urlSafe selects the URL-safe alphabet (- and _ instead of + and /). Optional ignorePadding relaxes padding rules so inputs that are missing or have extra = padding can still decode when the payload is otherwise valid; when ignorePadding is false, malformed padding commonly yields null. A null input yields null. For the inverse operation, see encode_base64.

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

Examples

Decodes a URL-safe Base64 payload without relaxing padding rules.

Uses standard Base64 alphabet decoding while allowing irregular padding on short tokens.