Base64Encode()

Converts plain text to Base64-encoded binary data.

The Base64Encode() function has two parameters:

  • stringToEncode (string): Required. The string to encode to Base64.
  • characterEncoding (string): The character encoding type to use when encoding the string. Accepted values: ASCII, UTF-7, UTF-8, UTF-16, and UTF-32.

To use the function, pass it the string that you want to encode. Optionally, specify the type of character encoding to use.

The example code outputs a string encoded in Base64.