Behavioral economic principles are increasingly being used in the fight against HIV, including improving voluntary testing in sub-Saharan Africa and South America. However, behavioral nudges have not been widely tested as a strategy to optimize HIV testing in pregnant women. Here, we assessed whether behavioral nudges or financial incentives were effective in optimizing HIV testing among pregnant women in a high-HIV burden setting. A randomized clinical trial was conducted between May 21 and Oct 5, 2018, to allocate pregnant women in Ecuador into three study arms: information only, soft commitment (i.e., a behavioral nudge), and financial incentives. All participants received an informational flyer, including the address of a testing location. Participants in the soft-commitment arm signed and kept a form on which they committed to get tested for HIV. Those in the financial incentive arm received a $10 incentive when tested for HIV. A stepwise logistic regression analysis estimated the effect of the study arms on HIV testing rate. Participants in the financial-incentive arm had higher odds of getting an HIV test (adjusted odds ratio 17.06, P, 0.001) as compared with information-only participants. Soft-commitment had the opposite effect (adjusted odds ratio 0.14, P 5 0.014). Financial incentives might be useful in improving HIV testing among pregnant women, especially among those who might be at higher risk but who have not completed an HIV test.