It remains unknown how Coronavirus disease-2019 (COVID-19) prevention measures implemented on March 12, 2020, have affected the rate of pediatric infection-related hospitalizations in Denmark. Therefore, we investigated the rate of pediatric infection–related hospitalizations during the COVID-19 pandemic. We used a retrospective cohort design and included all Danish children < 18 years. Infection-related hospitalizations were assessed during study periods in 2020 vs. 2018/2019, and we computed incidence rate ratios (IRRs) with 95% confidence intervals (CIs) using Poisson regression. In the 2020 study period, 3093 children were hospitalized with an infection, while the corresponding figures for 2018 and 2019 study periods were 4824 and 3830, respectively. When comparing the 2020 to the 2018/2019 study period prior to nationwide lockdown, we observed a decline in infection-related hospitalizations (12.68 (95% CI, 12.22–13.16) vs. 15.49 (95% CI, 15.12–15.86) per 1000 person-years). We further observed decreased IRRs, especially during the lockdown period (week 11: 0.64 (95% CI, 0.55–0.75); week 12: 0.26 (95% CI, 0.21–0.33); week 13: 0.13 (95% CI, 0.10–0.19)). Conclusion : The rate of pediatric infection-related hospitalizations in Denmark declined during the COVID-19 pandemic in 2020 compared to that in 2018/2019, with a 36% decline during initiation of the nationwide lockdown period. What is Known: • Due to the COVID-19 pandemic, several countries have implemented mitigation strategies such as lockdown of non-critical business functions. Most of these strategies have previously been proven effective on interruption of infection transmission. • It remains unclear how the mitigation strategies have affected the rate of pediatric infection–related hospitalizations. What is New: • Insight on how COVID-19 prevention measures have affected the frequency of infection-related hospitalization. • Valuable knowledge on how to act in potential future pandemics. Supplementary Information The online version contains supplementary material available at 10.1007/s00431-021-03934-2.