Skip to main content

$$base64

Encode to or decode from base64.

Usage​

{
"$$base64": /* value */,
"action": "ENCODE",
"rfc": "BASIC",
"without_padding": false
}
"$$base64([action],[rfc],[without_padding]):{input}"

Returns​

String

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimaryStringYesValue to encode/decode
actionEnumENCODE/DECODEENCODEWhether to encode or decode input
rfcEnumBASIC/URL /MIMEBASICWhich alphabet to use (BASIC = "The Base64 Alphabet" from RFC-2045, URL = "URL and Filename safe Base64 Alphabet" from RFC-4648, MIME = Same as BASIC but in lines with no more than 76 characters each)
without_paddingbooleanfalse/truefalseDon't add padding at the end of the output (The character =)

Examples​

Input

Definition

Output

"hello"
"$$base64(ENCODE):$"
"aGVsbG8="
"aGVsbG8="
"$$base64(DECODE):$"
"hello"
"hello-world"
{
"$$base64": "$",
"action": "ENCODE",
"rfc": "MIME",
"without_padding": true
}
"aGVsbG8td29ybGRoZWxsby13b3JsZGhlbGxvLXdvcmxkaGVsbG8td29ybGRoZWxsby13b3JsZGhl\nbGxvLXdvcmxkaGVsbG8td29ybGQ"