Laws that prohibit prostitution serve to deter individuals from selling and buying sex. Yet they may also deter sex workers from taking measures to mitigate the health risks of prostitution. Specifically, sex workers may fear that seeking out an HIV test will increase their risk of arrest for prostitution. This concern may be especially present in authoritarian settings and places where the rule of law is weak. In order to eliminate sex worker fear of arrest for getting an HIV test, public health scholars and policymakers advocate for the decriminalization of prostitution. Yet such policy reform often encounters significant amounts of political opposition. At best, it is a long-term solution to a public health threat that must be curbed now: sex workers have higher rates of HIV infection than the general population, and in many countries they have been the vectors of HIV transmission to the population at large. This paper evaluates a more immediate approach to increasing HIV testing amongst lawbreakers, whose illegal status acts as a barrier to their willingness to seek out an HIV test. It presents a randomized field experiment in which sex workers from a red light district in Beijing, China, were randomly assigned different incentives for getting an HIV test at a local hospital. With a small incentive (equivalent to $1.50 USD), 50% of participants got tested. With a larger incentive (equivalent to $15 USD), 91% of participants got tested. This experiment shows that the deterrent effect of perceived sanctions (Nagin 1998) can be overcome with modest incentives for AIDS tests. These findings have important policy implications for conducting health outreach within illegal populations who are at high-risk of spreading HIV/AIDS.