BASE64.ENCODE

BASE64.ENCODE returns the base64 encoded version of a given string.

Function category: Base64

Syntax

BASE64.ENCODE(arg1)

Arguments

Description

arg1

A string.

Examples

Let's say we receive the following user information:

{
"data": {
"user": {
"name": "secret_username",
"password": "secret_password"
}
}
}
# Encode information into authentication token
CONCATENATE("Bearer ", BASE64.ENCODE(
JOIN(":", data.user.name,
data.user.password)
)
)
# Returns Bearer c2VjcmV0X3VzZXJuYW1lOnNlY3JldF9wYXNzd29yZA==

Notes

To perform the opposite operation, decoding a given Base64 encoded string, use BASE64.DECODE