---
schema_version: "1"
id: 5f5e44e74825d042f8c3964bea6e34a653a6354ce52e381dcfbbc99e58d2e02b
title: Base64Encode
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_utilitiesBase64Encode.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_utilitiesBase64Encode.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 74f0860a50eaca45ea2a5bac2052d0a4270125fa0f29514103c8a2086fe3a0cb
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Base64Encode

## Overview

Encodes plain text to a Base64 encoded string

### Syntax

Base64encode(1)

### Function Properties

<!--complex table-->

| Ordinal | Type   |              | Description    |
| ------- | ------ | ------------ | -------------- |
| **1**   | string | **Required** | Text to encode |

## Example

This sample code performs a Base64 encoding on a plain text string:

```
var decoded = 'Convert to Base64';
var encoded = Base64Encode(decoded); // "Q29udmVydCB0byBCYXNlNjQ="
```
