---
schema_version: "1"
id: 3aece642d262fdd54fd9a50c4d1a4120380b3773f042bac1abc596202b2029ac
title: "Handlebars Helper Function: char"
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/handlebars/reference/string/mcn-handlebars-reference-string-char.md
canonical_url: https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-string-references/mcn-handlebars-reference-string-char.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 22a5b14a17eefaf5a1bdaf7440e9faa561296adf1ad157191217a4d93c2c4631
products:
  - Handlebars for Marketing Cloud Next
  - Marketing Cloud
---
# Handlebars Helper Function: char

Returns the Unicode character that corresponds to a specified character code. The function can optionally repeat the character a specified number of times.

## Availability

This helper is available in the Winter ’26 release of Marketing Cloud Next.

## Syntax

```handlebars
{{char code repeated}}
```

## Parameters

| Parameter  | Type              | Description                                                                                                         |
| ---------- | ----------------- | ------------------------------------------------------------------------------------------------------------------- |
| `code`     | Number or String  | Required. The Unicode character code in decimal notation. Must be a number or convertible to a number.              |
| `repeated` | Integer or String | The number of times to repeat the character. Must be a number or convertible to a number. The default value is `1`. |

## Return Value

The function returns the Unicode character that corresponds to the provided code. If a repeat count is specified, it returns the character that many times. For both parameters, the function attempts to convert strings to numbers.

The function throws an exception if the `repeated` parameter is negative. The function also throws an exception if the value of either parameter isn't a number or convertible to a number.

If the value of the `code` parameter is outside the 16-bit range (0-65535), the function wraps it around to a valid Unicode value by taking the modulo of the value and 65536. For example, `{{char 65602 1}}` returns `B` (U+0042), because 65602 % 65536 is 66 in decimal notation or 42 in hexadecimal.
