Contact Free trial Login

toBase64

toBase64(Binary): String

Transforms a binary value to a Base64 string.

Parameters

Name Description

content

The binary value to transform.

Example

This example transforms a binary to Base64.

Source

%dw 2.0
import * from dw::core::Binaries
var myBinary = "Mule" as Binary
output application/json
---
{ "BinaryToBase64" : toBase64(myBinary) }

Output

 { "BinaryToBase64": "TXVsZQ==" }