--- url: https://developer.youcan.shop/themes/filters/strings/replace.md --- # Replace Replaces all instances of a substring with a different string. ```liquid {{ string | replace: substring, replacement }} ``` ## Example ```liquid {{ 'red shirt, red hat' | replace: 'red', 'blue' }} ``` ::: tip Output ```html blue shirt, blue hat ``` :::