Skip to main content
Scalar function
Aliases: from_base64 Returns NULL for NULL input.

Syntax

Scalar

Arguments

Returns

  • Type: BINARY
  • Possible values: Decoded bytes.
  • NULL behavior: Returns NULL for NULL input.

Properties

Usage notes

  • Encoding inserts a CRLF line break every 76 characters. Decoding removes CR and LF characters.

Examples

Typical behavior

Decode zero and high-byte values

Limitations

  • Invalid Base64 raises an error.
  • Padding and line-break handling can differ for some STRING column representations. Do not rely on identical padding or CR/LF formatting across all input sources.
  • FROM_BASE64 and UNBASE64 return BINARY. Query tools may report STRING instead; the returned bytes are not converted to text.
Last modified on October 15, 2026