---
schema_version: "1"
id: 29e7ce63de5995a2495ebec8efa6796c3e644d115e82d2356a90ead91943686b
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_utilitiesBase64Decode.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_utilitiesBase64Decode.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: fb4d1f7985e997fccde1409bfad6943cb474ac3c5f40c3fc3e4418e422aacdbf
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Base64Decode

## Overview

Decodes a Base64 encoded string to a plain text string

### Syntax

Base64Decode(1)

### Function Properties

<!--complex table-->

| Ordinal | Type   |              | Description                     |
| ------- | ------ | ------------ | ------------------------------- |
| **1**   | string | **Required** | Base64 encoded string to decode |

## Example

This sample code takes a Base64 encoded string passed to the function and returns a plain text string.

```
var encoded = 'VGhpcyB3YXMgYSBCYXNlNjQgZW5jb2RlZCBzdHJpbmcu';
var decoded = Base64Decode(encoded); // "This was a Base64 encoded string."
```
