The SUBSTITUTE() function in Salesforce finds a piece of text inside a string and replaces every occurrence of it with new text. It is the function admins reach for when they need to clean phone numbers, swap an email domain, standardise country names or strip unwanted characters in a formula field, without writing Apex.
In this tutorial, I will explain the syntax, show results I tested in a Salesforce Developer Edition org, walk through a formula field step by step, and clear up a few myths that other guides repeat: Salesforce formulas have no REPLACE or LET function, and SUBSTITUTE has no “occurrence” argument.