Decriminalising sex work could help avert almost half of all new HIV infections globally among workers and clients in the next 10 years.