Outdated Version

You are viewing an older version of this section. View current production version.

FROM_BASE64

Takes a base-64 encoded string and returns the decoded result as a binary string. The result is NULL if the argument is NULL or an invalid base-64 string.

Syntax

FROM_BASE64 (str)

Arguments

  • str: a base-64 encoded string

Return Type

Binary string (blob)

Examples

select to_base64('abracadabra'), from_base64(to_base64('abracadabra'));
+--------------------------+---------------------------------------+
| to_base64('abracadabra') | from_base64(to_base64('abracadabra')) |
+--------------------------+---------------------------------------+
| YWJyYWNhZGFicmE=         | abracadabra                           |
+--------------------------+---------------------------------------+