Skip to main content
base64decode(str) decodes a standard base64-encoded string and returns the original UTF-8 string.

Signature

Example

Decode a base64-encoded secret stored in an environment variable before passing it to a command:
The secret is stored encoded in the CI environment and decoded at run time.

Notes

  • The input must be valid standard base64. URL-safe base64 (with - and _) is not supported directly. Use replace to convert if needed.
  • The decoded value is interpreted as a UTF-8 string. Binary content may not round-trip cleanly.
  • For the reverse operation, use base64encode.