Esomeprazole is used to treat conditions where there is too much acid in the stomach. It is used to treat duodenal and gastric ulcers, erosive esophagitis, gastroesophageal reflux disease (GERD), and Zollinger-Ellison syndrome, a condition wherein the stomach produces too much acid.