Objective: Routinely collected health data may be valuable sources for conducting research. This study aimed to evaluate the validity of algorithms detecting hypopituitary patients in the Danish National Patient Registry (DNPR) using medical records as reference standard. Study design and setting: Patients with International Classification of Diseases (10th edition [ICD-10]) diagnoses of hypopituitarism, or other diagnoses of pituitary disorders assumed to be associated with an increased risk of hypopituitarism, recorded in the DNPR during 2000–2012 were identified. Medical records were reviewed to confirm or disprove hypopituitarism. Results: Hypopituitarism was confirmed in 911 patients. In a candidate population of 1,661, this yielded an overall positive predictive value (PPV) of 54.8% (95% confidence interval [CI]: 52.4–57.3). Using algorithms searching for patients recorded at least one, three or five times with a diagnosis of hypopituitarism (E23.0x) and/or at least once with a diagnosis of postprocedural hypopituitarism (E89.3x), PPVs gradually increased from 73.3% (95% CI: 70.6–75.8) to 83.3% (95% CI: 80.7–85.7). Completeness for the same algorithms, however, decreased from 90.8% (95% CI: 88.7–92.6) to 82.9% (95% CI: 80.3–85.3) respectively. Including data of hormone replacement in the same algorithms PPVs increased from 73.2% (95% CI: 70.6–75.7) to 82.6% (95% CI: 80.1–84.9) and completeness decreased from 94.3% (95% CI: 92.6–95.7) to 89.7% (95% CI: 87.5–91.6) with increasing records of E23.0x. Conclusion: The DNPR is a valuable data source to identify hypopituitary patients using a search criteria of at least five records of E23.0x and/or at least one record of E89.3x. Completeness is increased when including hormone replacement data in the algorithm. The consequences of misclassification must, however, always be considered.