replace

Replace every occurrence of a specified substring with another replacement string.

Syntax

{{ string | replace: substring, replacement }}

Example

{% assign area = "Austin TX and Dallas TX" %}{{ area | replace: "TX", "Texas" }}

Output

Austin Texas and Dallas Texas

The replace filter searches a string for every instance of a designated substring and substitutes it with a replacement string. It offers a straightforward mechanism for bulk text normalization across template outputs.

On keyword-driven landing page templates, replace expands abbreviations or updates legacy terminology in vendor CSV data. For example: {{ row.service_area | replace: 'St.', 'Street' }} or replacing state postal codes with full names. This produces consistent, search-engine-friendly copy that matches organic user search queries precisely.

Try this syntax in the editor.