## Syntax ```mermaid %%{init: { 'theme': 'base', 'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' }, 'themeVariables': { 'fontSize': '11px', 'fontFamily': 'Arial' } }}%% flowchart LR Start((START)) --> BASE64_DECODE[BASE64_DECODE]:::quoted BASE64_DECODE --> End((END)) ``` ## Purpose The `BASE64_DECODE` SQL function converts a base64 encoded value back to the binary object (`blob`) as defined on [Wikipedia](https://en.wikipedia.org/wiki/Base64). See also [[BASE64_ENCODE]]. Parameters: - Input: value to convert back to the original. Returns: the input decoded back to the binary value. ## Examples `BASE64_DECODE` maps the text `aGk=` to a binary object and then to a text in 7-bit ASCII character set: ```sql select blob_to_text(base64_decode('aGk='), 'ASCII') -------- hi ```