The NSW government announced $4.3 million to continue the service, which allows festival-goers to anonymously check the contents of their illicit drugs at selected events from October.
It follows a report into the state's pill testing trial, released in March, which found the service effectively reduced harms associated with illicit drug taking at festivals.
Jennie Ross-King, whose daughter Alex died from an MDMA overdose at a music festival in 2019, has long been calling for drug law reform in wake of the 19-year-old's death.
An inquest found Alex took an unusually high amount of the drug before entering the festival because she was afraid of being caught with them by police.
She welcomed the government's announcement, saying young people did not deserve to die because of one decision.
"This will go a long way towards giving young people the information they need to make safer choices and, ultimately, ensuring they come home safely to the people who love them," she said.
NSW Health will now begin consulting the music festival industry and harm reduction organisations to choose up to 15 festivals to take part in the program.
But drug law reform organisation Unharm said pill testing should be extended beyond music festivals.
Chief executive Will Tregoning said research had found roughly three quarters of MDMA-related deaths occurred at private residences, and only seven per cent at festivals or dance parties.
"These services shouldn't be restricted only to people who can afford to attend festivals - they need to be expanded to community-based sites in NSW," he said.
The call was echoed by Greens MP Cat Faehrmann, who said highly dangerous substances were increasingly being found in common street drugs like cocaine, ketamine, methamphetamine and MDMA.
"Permanent drug checking services in the community are essential if we're to save more lives," she said.
Community pill testing is already in place in the ACT and Victoria, with mobile testing also available at certain events.
Queensland became the first state to ban pill testing altogether last year, resulting in the closure of existing services.
NSW Health Minister Ryan Park said that while pill testing could reduce harm, the government did not endorse illicit drug use.
"Let me be clear, no level of illicit drug use is safe and drug checking services are not a silver bullet," he said.
NSW Police have vowed to keep a highly visible presence, including sniffer dogs, at festivals with pill testing sites.
More than 20 people were charged with drug possession at the Yours and Owls festival in Wollongong in March last year.
The festival was the first to take part in the pill testing pilot program.
Lifeline 13 11 14
beyondblue 1300 22 4636