---
schema_version: "1"
id: 71f0692e2b21cd82a4bd4a6694c80a3d9cae77b7df96105924d8986683da0473
title: "Handlebars Helper Function: replace"
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-replace.md
canonical_url: https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-string-references/mcn-handlebars-reference-string-replace.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b5c960d98e0a8825832754faf87bde0d4132e518930423d7397d3731763e69fe
products:
  - Handlebars for Marketing Cloud Next
  - Marketing Cloud
---
# Handlebars Helper Function: replace

Replaces occurrences of a search string with a replacement string in a case-sensitive manner. This ensures precise string matching and replacement.

## Availability

This helper is available in the Winter ’26 release of Marketing Cloud Next.

## Syntax

```handlebars
{{replace subject search replacement culture}}
```

## Parameters

| Parameter     | Type   | Description                                                                                                                                                                    |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `subject`     | String | Required. The string to search and replace in. Non-string inputs are converted to strings through language-level type coercion.                                                |
| `search`      | String | Required. The string to search for (case-sensitive). Non-string inputs are converted to strings through language-level type coercion.                                          |
| `replacement` | String | Required. The string to replace matches with. Non-string inputs are converted to strings through language-level type coercion.                                                 |
| `culture`     | String | BCP 47 locale code for culture-specific case comparison. Supports both hyphen (`en-US`) and underscore (`en_US`) formats. Defaults to current system culture if not specified. |

## Return Value

The function returns the input string with all occurrences of the search string replaced by the replacement string. The search is performed case-sensitively for precise matching. If the search string is empty, no replacement occurs. If the input is null, it returns an empty string.
