All music festivals should provide drug testing facilities, where people can go and find out if substances are safe, says the Royal Society for Public Health.
This will reduce the risk of serious harm from recreational drug use, after a sharp increase in drug deaths in England and Wales, it says.
A rise in drug strength means users may be taking drugs at dangerous levels.
But no level of illegal drug use is ever entirely safe, the Society says.
The RSPH says allowing festival-goers to check the content and strength of substances they possess should also be introduced in city centres where drug use in clubs is common.
It says the idea is supported by the majority of clubbers and festival-goers.
Drug safety testing has already been carried out in the UK at two festivals last summer, with the support of local police and public health.
RSPH’s research suggests that nearly one in five users decided to get rid of their drugs once they became aware of what they contained.
Eight festivals in the UK are expected to offer drug safety testing facilities this summer, including Reading and Leeds festivals.
Deaths related to ecstasy use in England and Wales have risen from 10 in 2010 to 57 in 2015.
Drug-related deaths at UK festivals increased to six in 2016.
The rise is thought to have been largely caused by an increase in the average strength of ecstasy pills.
The Society said the average chemical content of an ecstasy pill in Europe is now around 125mg per tablet, compared to 50-80mg in the 1990s and 2000s.
Some ‘super pills’ now contain more than 300mg of MDMA (the chemical name for ecstasy).
Shirley Cramer CBE, chief executive of RSPH, said: “The rise in drug-related deaths at music festivals and night clubs is a growing problem for policy makers, health authorities and events companies alike.
“While the use of stimulant ‘club drugs’ such as ecstasy can never be safe, and RSPH supports ongoing efforts to prevent them entering entertainment venues, we accept that a certain level of use remains inevitable in such settings.
“We therefore believe that a pragmatic, harm reduction response is necessary.”
She urged event companies to make the facilities a standard part of the UK festival and clubbing scene.
Fiona Measham, professor of criminology, from Durham University, who was behind the drug safety testing pilots last year – called The Loop – said: “We believe that prioritising public health over criminal justice for drug users at a time of growing concern about drug-related deaths at festivals and nightclubs can help to reduce drug-related harm both on and off site.”