Base64Decode()

Converts Base64-encoded binary data to a string of text.

The Base64Decode() function has two parameters:

  • stringToDecode (string): Required. The Base64-encoded string to decode.
  • characterEncoding (string): The character encoding type to use when decoding the string. Accepted values: ASCII, UTF-7, UTF-8, UTF-16, and UTF-32.
  • abortSendOnFail (boolean): Specifies how to handle decoding failures when the function is used in an email. If the value of this parameter is 1, the email send is aborted if the string can’t be decoded. If the value is 0, the email send continues even if the string can’t be decoded. The default value is 1.

To use the function, pass it the string that you want to decode. You can specify the type of character encoding to use.

The example code outputs a string of plain text.