HUGO
Menu
GitHub 90265 stars Mastodon

encoding.Base64Encode

Returns the base64 encoding of the given content.
Syntax
encoding.Base64Encode INPUT
Returns
string
Alias
base64Encode

Usage

The encoding.Base64Encode function returns the base64 encoding of the given content. The function converts the input to a string before encoding it. Use the encoding.Base64Decode function to reverse the operation.

Examples

{{ "Hugo" | encoding.Base64Encode }} → SHVnbw==
{{ 42 | encoding.Base64Encode }} → NDI=