Christopher Hill, US pointman on stalled six-party nuclear talks with Pyongyang, said the United States had been talking to China, Russia, South Korea and Japan about how to deter such a step.
"All parties have made it clear that this would be a very, very serious step," Hill told a congressional hearing.
"It is a very small piece of the world. ... It is, frankly speaking, rather shocking that anyone would even think of exploding a nuclear weapon on the Korean peninsula."
Pyongyang declared in February 2005 it had nuclear weapons, but there have been no reports of a test. Speculation has been mounting that the Stalinist state may be preparing such a move.
Last July, North Korea defied international warnings and test-fired seven ballistic missiles, including its long-range Taepodong-2, believed to be capable of striking America's western seaboard.
US Secretary of State Condoleezza Rice said in an interview released Monday that time was running out to bring North Korea back to the negotiating table.
Hill, assistant secretary of state for East Asian and Pacific affairs, was testifying before the House of Representatives' Committee on International Relations.