Base64Encode()

Converts text to binary data by using Base64 encoding.

The Base64Encode() function has two parameters:

  • stringToEncode (string): Required. The string to encode using 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. You can specify the type of character encoding to use.

The example code outputs a Base64-encoded string.