To end the HIV and hepatitis C virus (HCV) epidemics, people who use drugs (PWUD) need more opportunities for testing. While inpatient hospitalizations are an essential opportunity to test people who use drugs (PWUD) for HIV and HCV, there is limited research on rates of inpatient testing for HIV and HCV among PWUD. Eleven hospital sites were included in the study. Each site created a cohort of inpatient encounters associated with injection drug use. From these cohorts, we collected data on HCV and HIV testing rates and HIV testing consent policies from 65 276 PWUD hospitalizations. Hospitals had average screening rates of 40% for HIV and 32% for HCV, with widespread heterogeneity in screening rates across facilities. State consent laws and opt-out testing policies were not associated with statistically significant differences in HIV screening rates. On average, hospitals that reflexed HCV viral load testing on HCV antibody testing did not have statistically significant differences in HCV viral load testing rates. We found suboptimal testing rates during inpatient encounters for PWUD. As treatment (HIV) and cure (HCV) are necessary to end these epidemics, we need to prioritize understanding and overcoming barriers to testing.