Ranitidine (Zantac) decreases the amount of stomach acid produced which aids in the treatment of ulcers and helps to prevent ulcer formation. It is also used in the treatment of gastritis and esophagitis . It may also stimulate movement of food through the stomach and intestine.