Background Treadmill workstations that enable office workers to walk on a treadmill while working at their computers might increase physical activity in offices, but long-term effects are unknown. We therefore investigated whether treadmill workstations in offices increased daily walking time.Methods We did a randomised controlled trial of healthy office workers who were either overweight or obese. We recruited participants from 13 different companies, which comprised 17 offices, in Umeå, Sweden. We included people who were aged 40-67 years, had sedentary work tasks, and had a body-mass index (BMI) between 25 kg/m² and 40 kg/m². After the baseline measurement, we stratified participants by their BMI (25-30 kg/m² and >30 to 40 kg/m²); subsequently, an external statistician randomly assigned these participants (1:1) to either the intervention group (who received treadmill workstations for optional use) or the control group (who continued to work at their sit-stand desks as usual). Participants in the intervention group received reminders in boosting emails sent out to them at four occasions during the study period. Researchers were masked to group assignment until after analysis of the primary outcome. After the baseline measurement, participants were not masked to group belongings. The primary outcome was total daily walking time at weekdays and weekends, measured at baseline, 2 months, 6 months, 10 months, and 13 months with the accelerometer activPAL (PAL Technologies, Glasgow, UK), which was worn on the thigh of participants for 24 h a day for 7 consecutive days. We used an intention-to-treat approach for our analyses. This trial is registered with ClinicalTrials.gov, number NCT01997970, and is closed to new participants.Findings Between Nov 1, 2013, and June 30, 2014, a total of 80 participants were recruited and enrolled (n=40 in both the intervention and control groups). Daily walking time during total time awake at weekdays increased between baseline and 13 months by 18 min (95% CI 9 to 26) in the intervention group and 1 min (-7 to 9) in the control group (difference 22 min [95% CI 7 to 37], p interaction =0•00045); for weekend walking, the change from baseline to 13 months was 5 min (−8 to 18) in the intervention group and 8 min (−5 to 21) in the control group (difference -1 min [-19 to 17]; p interaction =0•00045). Neither measure met our predetermined primary outcome of 30 min difference in total walking time between the intervention and control group, so the primary outcome of the trial was not met. One adverse event was reported in a participant who accidently stepped on their Achilles tendon.Interpretation In a sedentary work environment, treadmill workstations result in a statistically significant but smallerthan-expected increase in daily walking time. Future studies need to investigate how increasing physical activity at work might have potentially compensatory effects on non-work activity.