The US Defence Secretary James Mattis has said any use of nuclear weapons by North Korea would be met with an "effective and overwhelming" response.
Mr Mattis spoke in South Korea, where he had been reaffirming US support, before flying to Tokyo.
He also reconfirmed plans to deploy a US missile defence system in South Korea later this year.
North Korea's repeated missile and nuclear tests and aggressive statements continue to alarm and anger the region.
The US has a considerable military presence in South Korea and Japan, as part of a post-war defence deal. There are just under 28,500 US troops in the country, for which Seoul pays about $900m (£710m) annually.
President Donald Trump has previously said he wants both South Korea and Japan to pay more towards maintaining that presence.
Mr Mattis used his visit to reassure South Korea that the Trump administration "remains steadfast" in its "iron-clad" defence commitments to the region, said the Pentagon.
Speaking after talks at the defence ministry with his South Korean counterpart Han Min-koo, Mr Mattis told reporters that "any attack on the United States, or our allies, will be defeated, and any use of nuclear weapons would be met with a response that would be effective and overwhelming".
North Korea conducted its fifth test of a nuclear device last year, and claims it is capable of carrying out a nuclear attack on the US, though experts are still unconvinced its technology has progressed that far.
It has also said in recent weeks that it has a new intercontinental ballistic missile, capable of reaching the US mainland, which it is prepared to test launch at any time.
Mr Mattis's assertion that an attack by North Korea would get massive retaliation will hardly be a revelation to Kim Jong-un, says the BBC's Stephen Evans in Seoul.
The bigger question is whether to talk to the North Korean leader to try to persuade him to abandon or limit the size of his nuclear arsenal, our correspondent adds. On that, the Trump administration has so far been silent.
Under the Obama administration, the US and South Korea agreed to deploy a US-made Terminal High Altitude Area Defense (THAAD) missile defence system in South Korea.
Its supporters say it is aimed solely at defending from North Korean threats. But China and Russia have complained it is provocative.
Beijing says it goes "far beyond the defence needs of the Korean peninsula". It believes the system's radar would allow the US to spy on its military.