AMPscript
Base 64 Decode
Base 64 Encode
Validate Your Server-Side JavaScript using WSProxy
Decodes a Base64 encoded string to a plain text string
Base64Decode(1)
| Ordinal | Type | Description | |
|---|---|---|---|
| 1 | string | Required | Base64 encoded string to decode |
This sample code takes a Base64 encoded string passed to the function and returns a plain text string.
1var encoded = 'VGhpcyB3YXMgYSBCYXNlNjQgZW5jb2RlZCBzdHJpbmcu';
2var decoded = Base64Decode(encoded); // "This was a Base64 encoded string."