HUGO
Menu
GitHub 90234 stars Mastodon

encoding.HexEncode

Returns the hexadecimal encoding of the given content.
Syntax
encoding.HexEncode INPUT
Returns
string

Usage

The encoding.HexEncode function returns the hexadecimal encoding of the given content. The function converts the input to a string before encoding it. Use the encoding.HexDecode function to reverse the operation.

Examples

{{ "Hello world" | encoding.HexEncode }} → 48656c6c6f20776f726c64