The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.


Encodes any string value. You can only decode any encoded string values using the specific server-side JavaScript function Base64Decode() and not any other Base64-encoded string values.

Base64Encode(1, 2)

1stringRequiredString to encode
2stringCharacter set to use when decoding string value, such as ASCII or UTF-8