HIV testing in prison settings has been identified as an important mechanism to detect cases among high-risk, underserved populations. Several public health organizations recommend that testing across healthcare settings, including prisons, be delivered in an opt-out manner. However, implementation of opt-out testing within prisons may pose challenges in delivering testing that is informed and understood to be voluntary. In a large state prison system with a policy of voluntary opt-out HIV testing, we randomly sampled adult prisoners in each of seven intake prisons within two weeks after their opportunity to be HIV tested. We surveyed prisoners’ perception of HIV testing as voluntary or mandatory and used multivariable statistical models to identify factors associated with their perception. We also linked survey responses to lab records to determine if prisoners’ test status (tested or not) matched their desired and perceived test status. Thirty eight percent (359/936) perceived testing as voluntary. The perception that testing was mandatory was positively associated with age less than 25 years (adjusted relative risk [aRR]: 1.45, 95% CI: 1.24, 1.71) and preference that testing be mandatory (aRR: 1.81, 95% CI: 1.41, 2.31), but negatively associated with entry into one of the intake prisons (aRR: 0.41 95% CI: 0.27, 0.63). Eighty-nine percent of prisoners wanted to be tested, 85% were tested according to their wishes, and 82% correctly understood whether or not they were tested. Most prisoners wanted to be HIV tested and were aware that they had been tested, but less than 40% understood testing to be voluntary. Prisoners’ understanding of the voluntary nature of testing varied by intake prison and by a few individual-level factors. Testing procedures should ensure that opt-out testing is informed and understood to be voluntary by prisoners and other vulnerable populations