> For the complete documentation index, see [llms.txt](https://docs.onum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onum.com/pipelines/actions/transformation/field-transformation/field-transformation-operations/data-format/to-base64.md).

# To base64

## Description

This operation is used to encode data into a Base64 string. Base64 is a binary-to-text encoding method commonly used to encode binary data (like images or files) into text that can be easily transmitted over text-based protocols such as email, JSON, or XML. It’s also used for data storage, ensuring the data remains ASCII-safe.

***

## Data types

These are the input/output expected data types for this operation:

### Input data

`String` - The string you want to encode.

### Output data

`String` - Resulting Base64 string.

***

## Example

Suppose you want to **encode** a series of events into **Base64**:

1. In your Pipeline, open the required [Action](https://onum.gitbook.io/onum-docs/the-workspace/pipelines/actions) configuration and select the input **Field**.
2. In the **Operation** field, choose **To Base64**.
3. Give your **Output field** a name and click **Save**. The values in your input field will be encoded. For example:

<pre><code><strong>Hello, Onum! -> IEhlbGxvLCBPbnVtIQ==
</strong></code></pre>

{% hint style="info" %}
You can try out operations with specific values using the **Input** field above the operation. You can enter the value in the example above and check the result in the **Output** field.
{% endhint %}
