In a rambling speech on his arrival in Davao City after a visit to Vietnam, Duterte told reporters that he had been "portrayed to be some cousin of Hitler" by critics.
Noting that Hitler had murdered millions of Jews, Duterte said: "There are three million drug addicts (in the Philippines). I'd be happy to slaughter them.
"If Germany had Hitler, the Philippines would have...," he said, pausing and pointing to himself.
"You know my victims. I would like (them) to be all criminals to finish the problem of my country and save the next generation from perdition."
Duterte was voted to power in a May election on the back of a vow to end drugs and corruption in the country of 100 million people. He took office on June 30 and over 3,100 people have been killed since then, mostly drug users and peddlers, in police operations and in vigilante killings.