Skip to content
Encoding & cryptographyReference

crypt.base64decode

Decode Base64 text into the original bytes.

Aliasesbase64decodebase64_decodebase64.decodecrypt.base64_decodecrypt.base64.decode

Details#

Decode Base64 text into the original bytes. Decoded binary string. Invalid input raises 'invalid base64'.

Signature#

Luau
crypt.base64decode(data: string): string

Parameters#

ParameterTypeDescription
datastringBase64-encoded input.

Returns#

Decoded binary string. Invalid input raises 'invalid base64'.

Examples#

Local example

Luau
print(crypt.base64decode("aGVsbG8=")) -- hello