---
title: fn::fromBase64
url: /docs/esc/environments/syntax/builtin-functions/fn-from-base64/
---
The `fn::fromBase64` built-in function decodes its input into a binary value. This can be used to realize binary values that are stored as Base64-encoded (often for use with the [`files` reserved property](/docs/esc/environments/syntax/reserved-properties/files). If the input to `fn::fromBase64` is a secret, the decoded value is also a secret.

## Declaration

```yaml
fn::fromBase64: value-to-decode
```

### Parameters

| Property          | Type   | Description                                                       |
|-------------------|--------|-------------------------------------------------------------------|
| `value-to-decode` | string | The base64-encoded value.

### Returns

The decoded data.

## Example

### Definition

```yaml
values:
  binary-data:
    fn::fromBase64: aGVsbG8sIHdvcmxkIQo=
```

### Evaluated result

```json
{
  "binary-data": "hello, world!"
}
```

