In a telephone call, Obama and Japanese Prime Minister Shinzo Abe discussed steps to respond to the "highly provocative violation of North Korea's international obligations, a White House statement said.
Pyongyang triggered international outrage on Tuesday by carrying out its latest nuclear detonation in defiance of UN Security Council resolutions.
US and South Korean monitors said the underground nuclear test was much more powerful than North Korea's previous tests in 2006 and 2009.
Obama and Abe agreed to cooperate on tougher UN sanctions against North Korea.
The pair "pledged to work closely together to seek significant action at the United Nations Security Council and to cooperate on measures aimed at impeding North Korea's nuclear and ballistic missile programs," the White House said.
A Japanese foreign ministry official said separately the two leaders "agreed to work together for the prompt adoption of a new UN resolution on enhancing sanctions" on North Korea.
Obama also "reaffirmed that the United States remains steadfast in its defense commitments to Japan, including the extended deterrence offered by the US nuclear umbrella," according to the White House.
Abe is due in Washington for talks with Obama later this month.
He also held a telephone summit with South Korean President Lee Myung-Bak on Wednesday, agreeing to push for tougher sanctions on the North.
The UN Security Council, including Pyongyang's nominal ally China, united on Tuesday to condemn the test and accuse North Korea of a "grave violation" of UN resolutions.
Obama, in his State of the Union address Tuesday, vowed to take "firm action" against North Korea.