BASE64_DECODE()
All functions > STRING > BASE64_DECODE()
Decodes a Base64 string back to plain text.
Signatures
Returns: Decoded string
BASE64_DECODE(encoded: VARCHAR) → VARCHAR sql
| Parameter | Type | Required | Description |
|---|---|---|---|
encoded | VARCHAR | Yes | Base64 text to decode |
Notes
- Expects standard Base64 (including padding where required); malformed input fails at run time
- Interprets decoded bytes as text (invalid byte sequences fail at run time)
- Returns NULL if the input is NULL (use
NULL(VARCHAR); bareNULLfails inference) - Inverse of
BASE64_ENCODEfor valid round-trip payloads
See also
Examples
FeatureQL
SELECT
f1 := BASE64_DECODE('aGVsbG8='), -- Decode ASCII payload
f2 := BASE64_DECODE(''), -- Empty Base64 decodes to empty string
f3 := BASE64_DECODE(NULL(VARCHAR)) -- NULL yields NULL
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR |
|---|---|---|
| hello | (empty) | NULL |
On this page