Giuliani said that Iran, a state sponsor of terrorism that is seeking nuclear weapons, needs to understand how the U.S. would respond.
"Anybody who wants to be president of the United States would say a prayer at the beginning that you would never have to use American military power," he said. "But as president, you can't hesitate to do that, if it's in the best interest of the United States."
"You have to stand up to dictators and tyrants and terrorists," he added. "Weakness invites attack. Strength keeps you safe."
On Iran specifically, he said, "We've seen what Iran will do with ordinary weapons. If I'm president, I guarantee you we will never find out what they would do with nuclear weapons because they're not going to get them.
Said McCain, "At the end of the day, we cannot allow the Iranians to acquire nuclear weapons."
The GOP presidential candidates spoke to the Republican Jewish Coalition.
On another subject, Giuliani said he would not negotiate with the Palestinians on the situation in the Middle East until two conditions are met: acknowledgment of Israel's right to exist as a Jewish state and a good-faith effort to stop terrorism.
"If they do those two things and mean it, then of course we can negotiate," Giuliani said. "We would like to have peace. But we don't want to have a peace in which we are taken advantage of. We don't want to have a peace in which Americans and Israelis are getting killed. And we certainly don't want to create another terrorist-supporting state. We have too many of them already."
Other GOP candidates were addressing the group later Tuesday.