PurposeThe Swedish National Patient Register (NPR) is often used in observational studies of childhood-onset inflammatory bowel disease (IBD) (<18 years of age) and its subtypes, but the validity of previously used register-based algorithms for capturing childhood-onset IBD has never been examined.MethodsWe identified a random sample of 233 individuals with at least two first ever diagnostic listings of IBD in the NPR between 2002 and 2014. We calculated the test characteristics for different register-based definitions of IBD and its subtypes using the Copenhagen criteria and the revised Porto criteria as gold standard, both based on medical chart review. We made assumptions of the occurrence of undiagnosed IBD in the general child population based on available literature.ResultsOut of 233 individuals with at least two diagnostic listings of IBD, 216 had true IBD, resulting in a positive predictive value (PPV) = 93% (95% confidence interval (CI) 89–96), sensitivity = 88% (95% CI 83–92), specificity = 100% (95% CI 100–100), and negative predictive value (NPV) = 100% (95% CI 100–100). The PPV for the NPR-based definitions of IBD subtypes at time of first IBD diagnosis and at end of follow-up were 78% (95% CI 69–86) and 88% (95% CI 80–94), respectively, for Crohn’s disease and 74% (95% CI 63–83) and 71% (95% CI 60–80), respectively, for ulcerative colitis.ConclusionThe validity of register-based definitions of childhood-onset IBD in the Swedish NPR is high and can be used to identify patients in observational research.