---
schema_version: "1"
id: c3fcc544af3e0f5040eed38cfe6fe0579514c7d980e74794c5f35c0716dfa8a2
title: fromBase64
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dw-binaries-functions-frombase64.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dw-binaries-functions-frombase64
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3f13640fb3efde2cdd03126bd6709dab4bc3fb2fbe8706c590ec064a69c5be73
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# fromBase64

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## fromBase64(String): Binary

Transforms a Base64 string into a binary value.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>base64String</code></p></td><td><p>The Base64 string to transform.</p></td></tr></tbody></table>

### Example

This example takes a Base64 encoded string and transforms it into a binary value. This example
assumes that the `payload` contains the Base64 string generated from an image in example
[toBase64](https://docs.mulesoft.com/dataweave/2.3/dw-binaries-functions-tobase64#toBase64-example).

#### Source

```DataWeave
%dw 2.0

import fromBase64 from dw::core::Binaries
output application/octet-stream
---
fromBase64(payload)
```

#### Output

The output of this function is a binary value that represents the image generated in example
[toBase64](https://docs.mulesoft.com/dataweave/2.3/dw-binaries-functions-tobase64#toBase64-example).
