---
schema_version: "1"
id: 453e1f447d35840767564afe23815651262ddcb32b14d2f0663d0f93a6e30a1b
title: "Handlebars Helper Function: indexOf"
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-indexof.md
canonical_url: https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-string-references/mcn-handlebars-reference-string-indexof.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1b4041085bf670cb720223a01335c334895542f42ae8c18dda289ba5cefa1b08
products:
  - Handlebars for Marketing Cloud Next
  - Marketing Cloud
---
# Handlebars Helper Function: indexOf

Returns the character position where a search string exists within a subject string. The search is case-insensitive and uses 1-based indexing.

## Availability

This helper is available in the Winter ’26 release of Marketing Cloud Next.

## Syntax

```handlebars
{{indexOf subject search}}
```

## Parameters

| Parameter | Type   | Description                                      |
| --------- | ------ | ------------------------------------------------ |
| `subject` | String | Required. The string to search within.           |
| `search`  | String | Required. The string to find within the subject. |

## Return Value

The function returns the 1-based position where the search string is found in the subject string. If the search string isn’t found or if either parameter is null, it returns 0. The search is case-insensitive.
