---
schema_version: "1"
id: e62112a1d99fc92c9a274fbe232cfc1921277539193f877a3492ead47990f7e2
title: "Handlebars Helper Function: sha512"
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/handlebars/reference/encryption/mcn-handlebars-reference-encryption-sha512.md
canonical_url: https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-encryption-references/mcn-handlebars-reference-encryption-sha512.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 208435a7c9bdac6f00cc30170841870922c9024febc0cdc813fc6173f7d4f6e3
products:
  - Handlebars for Marketing Cloud Next
  - Marketing Cloud
---
# Handlebars Helper Function: sha512

Converts a string to a 512-bit hexadecimal SHA-2 hash.

**note:** SHA-512 is a one-way hash and isn't suitable for securely storing passwords or other sensitive data.

## Availability

This helper is available in the Winter ’27 release of Marketing Cloud Next.

## Syntax

```handlebars
{{sha512 STRING_TO_CONVERT charset=CHARSET}}
```

## Parameters

| Parameter           | Type   | Description                                                                                                               |
| ------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `STRING_TO_CONVERT` | String | Required. The string to hash.                                                                                             |
| `charset`           | String | The character set to use. Specify as a named parameter. Accepted values are `UTF-8` and `UTF-16`. The default is `UTF-8`. |

## Return Value

The function returns the 512-bit SHA-2 hash as a hexadecimal string.

## Usage Example

This example hashes a string of text by using UTF-16 character encoding.

```handlebars
{{sha512 "This is a string of text." charset="UTF-16"}}
```

The function returns a hash of the string.

```
82fdb746ae8cc9a50b4da8e92706e41ef9d242a66c3d40a2a698124583f81769f35226679edbd2fa05c900a6c9ab8337b31f8fcc6f9f9cdfa56001899f758d8a
```
