Ranitidine hydrochloride (Zantac ®) is a medication that is available as both a prescription medication and an over-the-counter medication.It is used to treat several conditions related to the esophagus, stomach, and intestines. Ranitidine is part of a class of drugs known as H2 blockers. Duodenal ulcers (ulcers in the first part of the intestine after the stomach) -- Ranitidine can be used to treat a duodenal ulcer and also to prevent ulcers from coming back.