Upper gastrointestinal bleeding is typically a mild, self-limiting condition that can affect both preterm and term neonates, although it can be severe particularly when associated with co-morbidities. Pharmacological interventions with a proton pump inhibitor (PPI), H2 receptor antagonist (H2RA), antacid, bismuth and sucralfate may have effects on both the prevention and treatment of upper gastrointestinal bleeding in infants. To assess how different pharmacological interventions (PPIs, H2RAs, antacids, sucralfate or bismuth salts) administered to preterm and term neonates for the prevention or treatment of upper gastrointestinal bleeding to reduce morbidity and mortality compare with placebo or no treatment, supportive care, or each other. We used the standard search strategy of Cochrane Neonatal to search the Cochrane Central Register of Controlled Trials (CENTRAL 2018, Issue 6), MEDLINE via PubMed (1966 to 12 July 2018), Embase (1980 to 12 July 2018), and CINAHL (1982 to 12 July 2018). We also searched clinical trial databases, conference proceedings, the reference lists of retrieved articles for randomised controlled trials and quasi-randomised trials, and online for Chinese literature articles. We selected randomised, quasi-randomised and cluster-randomised trials involving preterm and term neonates. Trials were included if they used a proton pump inhibitor, H2 receptor antagonist, antacid, sucralfate or bismuth either for the prevention or treatment of upper gastrointestinal bleeding. Two review authors independently assessed the eligibility of studies for inclusion, extracted data and assessed methodological quality. We conducted meta-analysis using a fixed-effect model. We used the GRADE approach to assess quality of evidence. Eleven studies with 818 infants met the criteria for inclusion in this review.Four trials with 329 infants assessed the use of an H2 receptor antagonist for prevention of upper gastrointestinal bleeding in high-risk newborn infants. Meta-analysis of these four trials identified a reduction in any upper gastrointestinal bleeding when using an H2 receptor antagonist (typical risk ratio (RR) 0.36, 95% confidence interval (CI) 0.22 to 0.58; typical risk difference (RD) -0.20, 95% CI -0.28 to -0.11; number needed to treat for an additional beneficial outcome (NNTB) 5, 95% CI 4 to 9). The quality of evidence was moderate. A single trial with 53 infants assessing prevention of upper gastrointestinal bleeding reported no difference in mortality in infants assigned H2 receptor antagonist versus no treatment; however the quality of evidence was very low.Seven trials with 489 infants assessed an inhibitor of gastric acid (H2 receptor antagonist or proton pump inhibitor) for treatment of gastrointestinal bleeding in newborn infants. Meta-analysis of two trials (131 infants) showed no difference in mortality from use of a H2 receptor antagonist compared to no treatment. The quality of evidence was low. Meta-analysis of two trials (104 infants) showed a reduction in duration of upper gastrointestinal bleeding from use of an inhibitor of gastric acid compared to no treatment (mean difference -1.06 days, 95% CI -1.28 to -0.84). The quality of evidence was very low. Meta-analysis of six trials (451 infants) showed a reduction in continued upper gastrointestinal bleeding from use of any inhibitor of gastric acid compared to no treatment (typical RR 0.36, 95% CI 0.26 to 0.49; typical RD -0.26, 95% CI -0.33, -0.19; NNTB 4, 95% CI 3 to 5). The quality of evidence was low. There were no significant subgroup differences in duration of upper gastrointestinal bleeding or of continued upper gastrointestinal bleeding according to type of inhibitor of gastric acid. A single trial (38 infants) reported no difference in anaemia requiring blood transfusion from use of a H2 receptor antagonist compared to no treatment.Although no serious adverse events were reported from the use of a H2 receptor antagonist or proton pump inhibitor, some neonatal morbidities - including necrotising enterocolitis, ventilator-associated pneumonia, duration of ventilation and respiratory support, and duration of hospital stay - were not reported. Long-term outcome was not reported. There is moderate-quality evidence that use of an H2 receptor antagonist reduces the risk of gastrointestinal bleeding in newborn infants at high risk of gastrointestinal bleeding. There is low-quality evidence that use of an inhibitor of gastric acid (H2 receptor antagonist or proton pump inhibitor) reduces the duration of upper gastrointestinal bleeding and the incidence of continued gastric bleeding in newborn infants with gastrointestinal bleeding. However, there is no evidence that use of an inhibitor of gastric acid in newborn infants affects mortality or the need for blood transfusion. As no study reported the incidence of necrotising enterocolitis, ventilator- or hospital-associated pneumonia, sepsis, or long-term outcome, the safety of inhibitors of gastric acid secretion is unclear.