Candy-coated pills could make it impossible to create counterfeit drugs

RIVERSIDE, Calif. — Mary Poppins may have been right all along! A spoonful of sugar not only helps the medicine go down, but a bioengineering professor says it may prevent pharmaceutical fraud as well. By coating prescription drugs with candy, a new study finds that drugmakers could make it virtually impossible to create counterfeit pills.

UC Riverside’s Professor William Grover used tiny multicolored candy nonpareils to create a uniquely identifiable coating on the surface of capsules and pills. Grover calls this new technique CandyCode. The pills look just like the colorful candy sprinkles you see on the top of chocolate drops.

The study author notes that counterfeit pills and substandard medications harm millions of people each year and cost around $200 billion. The World Health Organization estimates that one in 10 medical products in the developing world are fake.

CandyCode could create a low-cost method of authenticating pills, which would be more effective and harder to duplicate than stamping medications with unique codes.

“The inspiration for this came from the little colorful chocolate candies. Each candy has an average of 92 nonpareils attached randomly, and the nonpareils have eight different colors. I started wondering how many different patterns of colored nonpareils were possible on these candies,” Grover says in a university release. “It turns out that the odds of a randomly generated candy pattern ever repeating itself are basically zero, so each of these candies is unique and will never be duplicated by chance.”

candy medicine
Diagram showing how a photograph of candy nonpareils are converted into a string of code suitable for storage in a database. (Grover, 2022)

CandyCode creates an infinite number of pill coatings

During his study, Prof. Grover used edible cake decorating glue to cover Tylenol capsules with nonpareils. The researcher then created a computer algorithm that converts a photo of the CandyCoded pill into a set of text strings which companies could store in a database.

Results show that the algorithm could successfully identify the unique coatings even after subjecting the pills to the physical wear-and-tear they may endure while in stores or during shipping.

“Using a computer simulation of even larger CandyCode libraries, I found that a company could produce 10^17 CandyCoded pills—enough for 41 million pills for each person on earth—and still be able to uniquely identify each CandyCoded pill,” Grover continues.

The professor adds that manufacturers could create even more combinations by adding in more colors and candy nonpareils of different shapes or sizes. Along with preventing prescription drug fraud, Grover notes there’s one other benefit of coating medicine with candy.

“Anecdotally, I found that CandyCoded caplets were more pleasant to swallow than plain caplets, confirming Mary Poppins’ classic observation about the relationship between sugar and medicine.”

The findings appear in the journal Scientific Reports.

YouTube video


  1. Wouldn’t making medicine more like candy be a bad idea? Wouldn’t this encourage children to overdose on meds?

  2. When I was a kid candy coated pills led to a lot of child poisonings, which led Pharmaceutical companies to drop the idea. Now a bad idea is back! Are we trying to reinvent the wheel?

Leave a Reply

Your email address will not be published. Required fields are marked *