---
schema_version: "1"
id: 49516b5854a267625afb48aa7eba49cd96cd18088d1ff2d5e5d598a611daea42
title: "Handlebars Helper Function: equals"
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/handlebars/reference/comparison/mcn-handlebars-reference-comparison-equals.md
canonical_url: https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-comparison-references/mcn-handlebars-reference-comparison-equals.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a148f20960985ddf9ccefda10828791da66879292b438079dea8d32e6fece2a9
products:
  - Handlebars for Marketing Cloud Next
  - Marketing Cloud
---
# Handlebars Helper Function: equals

Compares two values for equality. It can perform different types of comparisons based on an optional third parameter.

## Availability

This helper is available in the Winter ’26 release of Marketing Cloud Next.

## Syntax

```handlebars
{{equals value1 value2 compareAs}}
```

## Parameters

| Parameter   | Type   | Description                                                                                                                |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------- |
| `value1`    | Any    | The first value to compare.                                                                                                |
| `value2`    | Any    | The second value to compare.                                                                                               |
| `compareAs` | String | The type of comparison to perform. Possible values: `date`, `datetime`, `number`, `string`. The default value is `string`. |

## Return Value

The function returns `true` if the values are equal based on the specified comparison type, and `false` otherwise. If both values are null, it returns `true`. If no parameters are provided, it returns `true`. If one parameter is missing, it returns `false`. If you don’t specify a comparison type, the function performs a string comparison.
