---
schema_version: "1"
id: c17eab26a74f97224944cb22cee91e62dfcc1da9621b4ff753ea97810b6b273a
title: Handlebars Utility Functions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/handlebars/reference/utility/mcn-handlebars-reference-utility.md
canonical_url: https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7a623c92b374b28685cdcedace397318019e65595b59b44cfd61eb106f73008a
products:
  - Handlebars for Marketing Cloud Next
  - Marketing Cloud
---
# Handlebars Utility Functions

Use the Handlebars utility functions to perform several different types of tasks. The utility functions evaluate conditions, format numbers, output text, and more.

This section contains information about these Handlebars functions.

| Function Name                                                        | Description                                                                                                                   |
| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [base64Decode](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-base64decode.md)     | Converts Base64-encoded binary data to plain text.                                                                            |
| [base64Encode](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-base64encode.md)     | Converts plain text to Base64-encoded binary data.                                                                            |
| [domain](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-domain.md)                 | Returns the domain portion of an email address.                                                                               |
| [fallback](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-fallback.md)             | Returns a fallback value if the first argument is null, empty, or if an exception occurs.                                     |
| [format](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-format.md)                 | Formats output based on a format string and optional type specification.                                                      |
| [formatCurrency](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-formatcurrency.md) | Formats a number as a currency value.                                                                                         |
| [formatNumber](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-formatnumber.md)     | Formats a number as a numeric type.                                                                                           |
| [guid](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-guid.md)                     | Generates a globally unique identifier.                                                                                       |
| [isEmailAddress](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-isemailaddress.md) | Tests whether an email address is structurally valid.                                                                         |
| [isNullDefault](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-isnulldefault.md)   | Returns a default value when a value is null.                                                                                 |
| [length](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-length.md)                 | Returns the length of a string or the number of elements in an array.                                                         |
| [raiseError](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-raiseerror.md)         | Throws an exception with a specified error message and optional error code.                                                   |
| [repeat](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-repeat.md)                 | Repeats a block of template code a specified number of times, providing loop context variables for each iteration.            |
| [set](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-set.md)                       | Performs local variable assignment within its block scope.                                                                    |
| [sort](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-sort.md)                     | Sorts a list of objects by a specified field.                                                                                 |
| [with](https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-with.md)                     | Changes the context within a block to a specified object so that you can access properties without repeating the object name. |
