To Base64
Converts the input to Base64. Use it when you need to send binary data through text-only channels (APIs, email, logs) or
when a downstream step expects a Base64 string. Supports multiple alphabets (RFC 4648
standard and URL-safe, plus other common variants). To Base64 lives in the Data format category of the fx menu.
To reverse the encoding, use From Base64.
Parameters
Section titled “Parameters”Input is the primary value (previous step output or a literal). Alphabet is an editable preset on the function
card.
Returned value
Section titled “Returned value”Limitations
Section titled “Limitations”- Input must be binary (
ArrayBuffer). Non-binary input raisestoBase64: functionInput must be an ArrayBuffer. - Alphabet must be a string. Use the same alphabet later with From Base64.
- URL-safe alphabets omit or replace
+,/, and padding differently — pick the preset that matches the consumer.
Examples
Section titled “Examples”Encode with the standard alphabet
Encode binary or text-as-bytes into a standard Base64 string — the most common Base64 use in a flow.
- Set Input to the bytes or text from the previous step.
- Leave Alphabet on
Standard (RFC 4648): A-Za-z0-9+/=. - Confirm Output value is a Base64 string (for example
hellobecomesaGVsbG8=).
Encode with the URL-safe alphabet
Use the URL-safe alphabet when the Base64 string will appear in a URL or filename and you must avoid + and /.
- Set Input to the bytes to encode.
- Set Alphabet to
URL safe (RFC 4648 §5): A-Za-z0-9-_. - Confirm Output value uses
-and_instead of+and/where those sextets appear.