From Base64
Decodes a Base64 string to raw binary data. Use it when a previous step or API returns Base64 and you need the original
bytes for file handling, further decoding, or another transform. Supports the same alphabet presets as
To Base64, optional stripping of non-alphabet characters, and strict validation. From Base64 lives in
the Data format category of the fx menu.
Alphabet rules follow RFC 4648 (and related variants) when you pick a matching preset.
Parameters
Section titled “Parameters”Input is the primary Base64 string. Alphabet, Remove non-alphabet chars, and Strict mode are controls on
the function card.
Returned value
Section titled “Returned value”Limitations
Section titled “Limitations”- Input must be a string. Non-string input raises
fromBase64: functionInput must be a string. - Alphabet must match the encoder. A URL-safe payload decoded with the standard alphabet (or the reverse) fails or produces wrong bytes.
- With Strict mode on, malformed length, bad padding, or leftover non-alphabet characters raise an error.
- With Remove non-alphabet chars off and separators in the text, decoding fails unless you clean the string first.
Examples
Section titled “Examples”Decode a standard Base64 string
Decode the most common Base64 form back to bytes. Leave stripping on so whitespace in the string does not block decoding.
-
Set Input to the Base64 string. Paste:
Input aGVsbG8= -
Leave Alphabet on
Standard (RFC 4648): A-Za-z0-9+/=. -
Leave Remove non-alphabet chars on and Strict mode off.
-
Confirm Output value is the decoded binary (for example the bytes for
hello).
Decode with strict validation
Turn Strict mode on when you need to reject malformed Base64 instead of silently accepting odd lengths or padding.
- Set Input to the Base64 string from the previous step.
- Match Alphabet to the encoder.
- Turn Strict mode on.
- Confirm a well-formed string decodes to binary, or fix the Input if evaluation errors.