--- title: "Base64 decoding" slug: "core-base-64-decoder-resolver" updated: 2026-04-23T06:42:44Z published: 2026-04-23T06:42:44Z canonical: "docs.lobstersoftware.com/core-base-64-decoder-resolver" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Base64 decoding *See also:* [Base64 encoding](/v1/docs/en/core-base-64-encoder-resolver) > [!NOTE] > **Value resolver – Abstract** > > **Purpose:** "Decodes" a Base64-encoded `String` as an input value either as a `String` (default) or as a "ByteArray" (`byte[]`). > > > [!TIP] > > Tooltip > > > > - **Usage**: The *input value* must be a text value (`String`) that corresponds to the Base64 format (including the "=" filler character at the end if required). Then – depending on the **return as ByteArray** option – the "decoded" value is returned as a string or "ByteArray" (`byte[]`). Otherwise: "no value" (`$null`) > > - **Parameter**: The **return as ByteArray** option is unchecked by default. The decrypted value is then returned as a `String`. Otherwise: as "ByteArray" (`byte[]`). ![images/download/attachments/153256177/image-2024-6-13_11-29-33-version-1-modificationdate-1718270972359-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-6-13_11-29-33-version-1-modificationdate-1718270972359-api-v2.png) The [Base64 decoding](/v1/docs/en/core-base-64-decoder-resolver) resolver "decodes" a Base64-encoded string as an *input value* either as a `String` (*default*) or as a "ByteArray" (`byte[]`). The *input value* must correspond to the Base64 format and therefore fulfill the following requirements: 1. This is a text value (`String`). 2. The text value may only contain characters from the Base64 character set (`[A-Z][a-z][0-9]+/`) and *can* contain up to two instances of the fill character (=) at the end. 3. The length of the text value (including any filler characters at the end) must be an integer multiple of 4. If the *input value* violates at least one of these requirements, the return value is "no value" (`$null`). > [!NOTE] > Background: Base64 coding > > The Base64 code is not *encoding* in the cryptographic sense. It is merely a mapping rule for converting binary data by which a sequence of bytes (groups of 8 bits) is transferred into a character set with 64 "readable" and common characters (`[A-Z][a-z][0-9]+/`). > > As 6 bits are required to distinguish 64 characters, a group of 4 Base64 codes (4 x 6bit = 24bit) each represents 3 *unencrypted* bytes or letters of an ACSII text. > > Example: Text: `ABC` → ASCII byte sequence:` {65, 66, 67}` → Bits grouped 8 at a time: `{01000001, 01000010, 01000011}` → Bits grouped 6 at a time: `{010000, 010100, 001001, 000011}` → Base64 value/code: `{16/Q, 20/U, 9/J, 3/D}` → Base64 code: `QUJD` > > **NOTE:** At the end of the return value, up to two actual-equal characters (=) can appear, which are not contained in the Base64 character set and are only used as fill characters if the 3 : 4 substitution scheme is not completely utilized due to the length of the *input value*. Example: Text `AB` → `{01000001, 01000010} → {010000, 010100, 001000, } → {16/Q, 20/U, 8/I, } → QUI=` ## Configuration | The **return as ByteArray** option is unchecked by default. With this setting, the result of the decoding is returned as a text value (`String`). | ![images/download/attachments/153256177/image-2024-6-13_11-29-33-version-1-modificationdate-1718270972359-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-6-13_11-29-33-version-1-modificationdate-1718270972359-api-v2.png) | | --- | --- | | If the **return as ByteArray** option is checked, the result of the decoding is returned as a ByteArray (`byte[]`). | ![images/download/attachments/153256177/image-2024-6-13_12-13-52-version-1-modificationdate-1718273632041-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-6-13_12-13-52-version-1-modificationdate-1718273632041-api-v2.png) | ## Example The following example is only intended to illustrate the effect of the **return as ByteArray** option. It has no immediate practical use. | The screenshot on the right shows an [Execute with](/v1/docs/en/core-with-actor) value resolver whose **Object resolver** is used here to generate a Base64 string that "encodes" the character string "X►U" (with a special Unicode character in the second position). The generated Base64 string, which is the *temporary reference object* for the action block, is `WOKWulU`=, but this is of little relevance here. The action block contains a [Show alert](/v1/docs/en/freaction-show-alert) event action that uses one instance each of the [Base64 decoding](/v1/docs/en/core-base-64-decoder-resolver) resolver in the **Title** and **Message** to decode the generated base string. In the **Title**, the **return as ByteArray** option is unchecked (default), so that the original `String` ("X►U") is expected as the return value. In the **Message**, the **return as ByteArray** option is checked so that not the original `String` but an *array* is expected that lists all bytes required to encode its characters in UTF-8 format. In both cases, an [Object property](/v1/docs/en/core-property-resolver) value resolver is linked that accesses the length property, which specifies the `length` of the `Strings` or the byte array. Since the unencoded text contains a special character "►", for which the UTF-8 encoding – unlike for characters from the ASCII character set – requires *several* bytes, the length of the character string (3 characters) differs from the length of the byte array (5 bytes). | ![images/download/attachments/153256177/image-2024-6-13_15-39-0-version-1-modificationdate-1718285940032-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-6-13_15-39-0-version-1-modificationdate-1718285940032-api-v2.png) | | --- | --- | | Runtime example: ![images/download/attachments/153256177/image-2024-6-13_10-27-13-version-1-modificationdate-1718267232252-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-6-13_10-27-13-version-1-modificationdate-1718267232252-api-v2.png) |