"The fact that North Korea forced through a nuclear test this time is absolutely unacceptable to our country," Prime Minister Shinzo Abe said in a statement.
The North described the test of what it called a hydrogen bomb as a "perfect success".
"North Korea's nuclear and missile development programme is a threat that is more grave and urgent to the safety of our country and has entered a new stage," Abe said.
"It is significantly hurting regional and international peace and stability."
"Our country lodge a strict protest against North Korea and condemns it in the strongest words," Abe said.
"The government confirms that North Korea conducted a nuclear test after examining information from the weather agency and other information," Japanese Foreign Minister Taro Kono told reporters.
Defence Minister Itsunori Onodera said the ministry has begun flying "sniffer" planes capable of detecting radioactive fallout.
"We'll do our best to collect information," he said, according to public broadcaster NHK.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.