© Published by the BMJ Publishing Group Limited. Objective To test the effectiveness and safety of a total diet replacement (TDR) programme for routine treatment of obesity in a primary care setting. Design Pragmatic, two arm, parallel group, open label, individually randomised controlled trial. Setting 10 primary care practices in Oxfordshire, UK. Participants 278 adults who were obese and seeking support to lose weight: 138 were assigned to the TDR programme and 140 to usual care. 73% of participants were re-measured at 12 months. Interventions The TDR programme comprised weekly behavioural support for 12 weeks and monthly support for three months, with formula food products providing 810 kcal/day (3389 kJ/day) as the sole food during the first eight weeks followed by reintroduction of food. Usual care comprised behavioural support for weight loss from a practice nurse and a diet programme with modest energy restriction. Main outcome measures The primary outcome was weight change at 12 months analysed as intention to treat with mixed effects models. Secondary outcomes included biomarkers of cardiovascular and metabolic risk. Adverse events were recorded. Results Participants in the TDR group lost more weight (-10.7 kg) than those in the usual care group (-3.1 kg): adjusted mean difference -7.2 kg (95% confidence interval -9.4 to -4.9 kg). 45% of participants in the TDR group and 15% in the usual care group experienced weight losses of 10% or more. The TDR group showed greater improvements in biomarkers of cardiovascular and metabolic risk than the usual care group. 11% of participants in the TDR group and 12% in the usual care group experienced adverse events of moderate or greater severity. Conclusions Compared with regular weight loss support from a practice nurse, a programme of weekly behavioural support and total diet replacement providing 810 kcal/day seems to be tolerable, and leads to substantially greater weight loss and greater improvements in the risk of cardiometabolic disease. Trial registration International Standard Randomised Controlled Trials No ISRCTN75092026.