base64encode—Encodes the given data with base64.


This encoding is a group of similar encoding binary to text that represents binary data in an ASCII format and is designed to make binary data survive transport through transport layers that are not 8-bit clean. Each base64 digit represents exactly 6 bits of data. Three 8-bit bytes (a total of 24 bits) can therefore be represented by four 6-bit base64 digits. Base64-encoded data takes about 33% more space than the original data.

Minimum number of  arguments for this method is one.

Structure of the method:



string— is the data we want to encode in base64


In the example below, we encode a string into base64.

To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy.