Side-effects can include heart problems, blurred vision and diarrhoea, and some contain banned ingredients.
The Medicines and Healthcare Products Regulatory Agency (MHRA) said people should go to their GP for advice first.
A survey of 1,800 slimmers found one in three had bought pills online, with two-thirds experiencing side-effects.
Most of those questioned by the MHRA and Slimming World had bought online because they had wanted to lose weight quickly. About 40% said they had not wanted to speak to a GP or pharmacist.