Skip to content

qie.base64Decode

Signature: qie.base64Decode(input, charset*)

Returns: String decodedValue - the decoded value

Decode the Base64 encoded input value.

Note

UTF-8 encoding is used when charset is not specified.

Parameters

Type Name Description Default
String input the Base64 encoded value
String charset* (optional) the character set to use when decoding the bytes into a string UTF-8

Example

var originalString = '"Life is beautiful, and 爱 makes it even better!"';
var encoded = qie.base64Encode(originalString);
var decoded = qie.base64Decode(encoded); // decoded value will match originalString