ImportancePoint-of-sale food messaging can encourage healthier purchases, but no studies have directly compared multiple interventions in the field.ObjectiveTo examine which of 4 food and beverage messages would increase healthier vending machine purchases.Design, Setting, and ParticipantsThis randomized trial assessed 13 months (February 1, 2019, to February 29, 2020) of vending sales data from 267 machines and 1065 customer purchase assessments from vending machines on government property in Philadelphia, Pennsylvania. Data analysis was performed from March 5, 2020, to November 8, 2022.InterventionsStudy interventions were 4 food and beverage messaging systems: (1) beverage tax posters encouraging healthy choices because of the Philadelphia tax on sweetened drinks; (2) green labels for healthy products; (3) traffic light labels: green (healthy), yellow (moderately healthy), or red (unhealthy); or (4) physical activity equivalent labels (minutes of activity to metabolize product calories).Main Outcomes and MeasuresSales data were analyzed separately for beverages and snacks. The main outcomes analyzed at the transaction level were calories sold and the health status (using traffic light criteria) of each item sold. Additional outcomes were analyzed at the monthly machine level: total units sold, calories sold, and units of each health status sold. The customer purchase assessment outcome was calories purchased per vending trip.ResultsMonthly sales data came from 150 beverage and 117 snack vending machines, whereas 1065 customers (558 [52%] male) contributed purchase assessment data. Traffic light labels led to a 30% decrease in the mean monthly number of unhealthy beverages sold (mean ratio [MR], 0.70; 95% CI, 0.55-0.88) compared with beverage tax posters. Physical activity labels led to a 34% (MR, 0.66; 95% CI, 0.51-0.87) reduction in the number of unhealthy beverages sold at the machine level and 35% (MR, 0.65; 95% CI, 0.50-0.86) reduction in mean calories sold. Traffic light labels also led to a 30-calorie reduction (b = −30.46; 95% CI, −49.36 to −11.56) per customer trip in the customer purchase analyses compared to physical activity labels. There were very few significant differences for snack machines.Conclusions and RelevanceIn this 13-month randomized trial of 267 vending machines, the traffic light and physical activity labels encouraged healthier beverage purchases, but no change in snack sales, compared with a beverage tax poster. Corporations and governments should consider such labeling approaches to promote healthier beverage choices.Trial RegistrationClinicalTrials.gov Identifier: NCT06260176