Potential targets would include ones "located next to, or in," the capital Tehran, he said in a post on Truth Social.
The military response would follow any form of attack on shipping in the vital waterway, "whether it be by missile, rocket, drone, or any other device or weapon".
His threat follows the US launching strikes on Iran for the 11th consecutive night, with Tehran warning the US against targeting its nuclear facilities.
Iranian state media reported that air defences were activated in the capital Tehran. Explosions were also reported in the north-western city of Tabriz, the south-eastern ports of Chabahar and Konarak, and in the southern city of Bushehr, home to Iran's only nuclear power plant.
Iran, which has retaliated against the US and its Middle East allies, warned of reprisals after Trump said the US would soon hit an underground nuclear site near Natanz.
Kuwait's army said on Wednesday that its air defences had engaged with drone attacks from Iran, while Bahrain and Jordan said they had also intercepted drone and missile strikes.
The price of oil jumped in response to the latest escalation, reaching $94 on Wednesday.
Iran's top negotiator, Mohammad Bagher Ghalibaf, warned the US on Wednesday evening that "the equation of this war is clear: either all or none!
"In a region where we do not sell oil, no-one will sell oil. If our security is not ensured, no infrastructure will be safe, and the security of the strait is in the absence of American forces. We have repeatedly said that the situation of the strait will not return to pre-war conditions," Ghalibaf wrote in a post on X.
US Secretary of State Marco Rubio earlier said Washington was still willing to engage in diplomacy with Tehran, but added that he did not believe Iran was serious about talks.
Prior to that, the US president said the next military target could be a complex known as Pickaxe Mountain, an underground nuclear site where Iran is suspected of building an undeclared enrichment facility.
Trump also threatened to "take care of" the Houthi rebels if the Iran-backed militant group in Yemen followed through on its threatened blockade of Saudi ports.
A Houthi media official had earlier said they were closing the Bab al-Mandab Strait - the Red Sea's southern gateway - to Saudi vessels.
The Red Sea has become crucial for oil shipments from Saudi Arabia during the US-Israeli war with Iran, which has led to the effective closure of the Strait of Hormuz.

