---
schema_version: "1"
id: 554e0a2d107a5d0e0aff1e649f2baaafc3d2d4aa9ae1d253f7732d281c8b890c
title: Base64Decode
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_platformUtilityBase64Decode.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformUtilityBase64Decode.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a04a9e4fa7e38b825187eedd94ed2df8c931b0782ac77cac7da8d40ba2b2bc52
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Base64Decode

## Overview

Decodes any string value encoded using the Base64Encode() function. This function works only with values encoded using the specific server-side JavaScript function and not any other Base64-encoded string values.

### Syntax

Base64Decode(1, 2)

### Function Properties

<!--complex table-->

| Ordinal | Type   |              | Description                                                             |
| ------- | ------ | ------------ | ----------------------------------------------------------------------- |
| **1**   | string | **Required** | Base64 encoded string to decode                                         |
| **2**   | string |              | Character set to use when decoding string value, such as ASCII or UTF-8 |

## Example

```
<script runat="server">
     var encodedStr = Platform.Function.Lookup("forBase64Info","ReceiptData","ReceiptKey","stringValue");
     var decodedStr = Platform.Function.Base64Decode(encodedID);
</script>
```
