Index of Handlebars Functions

We organized the functions in this reference guide into categories based on the types of data that each function interacts with. For example, you can find information about Handlebars functions that manipulate dates and times in the Date & Time Functions category.

This table lists all of the existing Handlebars functions on a single page in alphabetical order. The purpose of this index is to make it easier to explore and discover Handlebars functions that you might not have encountered otherwise.

Function NameDescriptionCategory
AddReturns the sum of two numbers.Math
AndReturns true if both operands are true.Comparison
CharReturns a character when passed an ASCII character code.String
CompareCompares two values using a specified operator.Comparison
ConcatConcatenates strings of text.String
DivideReturns the result of dividing the first parameter by the second parameter.Math
EachLoops through a list of items and renders a block of template code for each item.Objects
EqualsCompares two values for equality.Comparison
FallbackReturns a fallback value if the first argument is null, empty, or if an exception occurs.Utility
FilterReturns a list of items that match a condition.Objects
FlattenFlattens a nested list into a single list.Objects
FormatFormats output based on a format string and optional type specification.Utility
FormatCurrencyFormats a number as a currency value.Utility
FormatNumberFormats a number as a numeric type.Utility
GetReturns the value of a property from an object.Objects
IfConditionally renders a block based on whether a value evaluates to true.Comparison
IIfEvaluates an expression and returns one of two values based on whether the expression is true or false.Comparison
IndexOfReturns the position at which a substring occurs within a string.String
IsEmptyChecks if a specified parameter evaluates to null or empty.Comparison
IsNullChecks if the given expression is null.Comparison
LengthReturns the length of a string or the number of elements in an array.Utility
LowercaseReturns the provided string using only lowercase letters.String
MapExtracts a specific field from each object in a list.Objects
ModuloReturns the remainder after dividing the first parameter by the second parameter.Math
MultiplyReturns the product of two numbers.Math
NotReturns true if the operand is false.Comparison
NowReturns the current system timestamp.Date & Time
OrReturns true if at least one operand is true.Comparison
PersonalizationResultRetrieves personalized content or data based on subscriber information and campaign context.Personalization
ProperCaseReturns specified string with the first letter of each word capitalized.String
RandomReturns a random number within a specified range.Math
RepeatRepeats a block of template code a specified number of times, providing loop context variables for each iteration.Utility
ReplaceReplaces every occurrence of one substring with a different substring.String
SetPerforms local variable assignment within its block scope.Utility
SliceReturns a portion of a list between two specified indices.Objects
SortSorts a list of objects by a specified field.Utility
SubstringReturns a portion of a string, beginning at a specified character position.String
SubtractReturns the result of subtracting the second parameter from the first parameter.Math
TrimRemoves white space from the beginning and end of a string.String
UnlessConditionally renders a block based on whether a value evaluates to false.Comparison
UppercaseReturns the provided string using only uppercase letters.String
WithChanges the context within a block to a specified object so that you can access properties without repeating the object name.Utility