# TO_BASE_64 function

## `TO_BASE_64` function

| Function Name | Description | Usage | Input parameter | Return value |
|---|---|---|---|---|
| `TO_BASE_64` | Encodes a string to base64 format using the UTF-8 charset. | `TO_BASE_64()` | N/A | A base64 encoded string. |

## Supported data type


The `TO_BASE_64` function supports the following data type:

- String

## Example: Encode a string to base64 format


**Sample data** : `$var1$ = "Hello World!"`


**Usage** : `$var1$.TO_BASE_64()`
Encode var1 in base64 format.


**Output** : `SGVsbG8gV29ybGQh`

## Recommendation

- Learn how to add and configure a [Data Mapping task](https://docs.cloud.google.com/application-integration/docs/configure-data-mapping-task.md.txt)