Browse the docs

base64Decode

Decodes base64 text back to text.

Details #

base64Decode(text) takes exactly one argument. It accepts base64 with or without the = padding and returns the bytes read as UTF-8 text. Bytes that aren't valid UTF-8 come back as replacement characters.

Parameters #

Takes 1 argument. {{ base64Decode(text) }}

Examples #

base64Decode("aGVsbG8=")
→ hello
base64Decode("aGVsbG8")
→ hello

Gotchas #

  • Text that isn't base64 is an error: base64Decode() needs base64 text. Line breaks and the URL-safe alphabet (- and _) are not accepted.