Skip to content

BASE64.DECODE

Kirill Chernyshov edited this page Mar 13, 2019 · 1 revision

The BASE64.DECODE Function

Function Group: Base64

BASE64.DECODE returns the decoded contents of a given base64 encoded string.

Syntax

BASE64.DECODE(arg1)

  • arg1 is a base64 encoded string

Uses

Let's say we receive some user information like that shown below:

{
   "data":{
      "user":{
         "authorization": "Bearer c2VjcmV0X3VzZXJuYW1lOnNlY3JldF9wYXNzd29yZA=="
      }
   }
}

If we want to decode that user token into human-readable information, we can use BASE64.DECODE:

BASE64.DECODE(REPLACE(data.user.authorization, 0, 7, ""))

This will return secret_username:secret_password.

Notes

To perform the opposite operation, base64 encoding a given string, use BASE64.ENCODE

Clone this wiki locally