Famotidine is used for treatment and prevention of ulcers and heartburn associated with acid indigestion and sour stomach It is also used to treat gastroesophageal reflux disease (GERD)  conditions that cause increased acid secretion  and esophagitis