President Obama in Japan
President Obama attends a news conference at the 2016 Ise-Shima G7 Summit in Shima, Japan, before a planned tour of Hiroshima. Reuters/Carlow Barria

Japan is eagerly awaiting the long hoped-for first visit of a sitting American president to Hiroshima, the city devastated beyond belief in an atomic attack at the end of World War II.

President Obama, who is in Japan for the G-7 summit, will reflect on the tragic human toll of war and deliver a message on the need to prevent the spread of nuclear weapons.

"Our visit to Hiroshima will ... reaffirm our shared vision of a world without nuclear weapons," he said earlier. But he won't apologise for the infamous attack that killed 140,000 Japanese, he has said.

The city was flattened when American B-29 bomber, the Enola Gay dropped the atomic bomb - named Little Boy - on Hiroshima, which then had a population of 350,000.

Three days later, the US dropped a more powerful plutonium bomb, called Fat Man, on Nagasaki, instantly killing another 73,000 human beings. Japan surrendered six days later, on 15 August, ending the war.

Obama will tour the Japanese city with Prime Minister Shinzo Abe. Some 180,000 people in the city are considered to be Hiroshima survivors, who still grapple with the effects of the biggest bomb attack in human history. Many are suffering from cancer or other radiation-induced illnesses and many never married because of concerns about birth defects in their future children.

Specific details of Obama's tour have not yet been released, but he will likely visit the Hiroshima Peace Memorial to lay a wreath and tour the memorial grounds, reported Agence France Presse. Then he will have an opportunity to deliver a "statement reflecting upon what his impressions are," Deputy National Security Advisor Ben Rhodes told People.

Obama told Japanese broadcaster NHK earlier that he will not apologise for the bombing, explaining: "I think that it's important to recognize that in the midst of war, leaders make all kinds of decisions."

He added: "I know as somebody who has now sat in this position for the last seven and a half years, that every leader makes very difficult decisions, particularly during war time."

The trip will be an opportunity for the president to "reflect on the extraordinary human toll of war and the loss of innocents in World War II — in Hiroshima and Nagasaki, but also in many countries around the world," said Rhodes. "I think the president wants to pay recognition to the human toll of war, and obviously this is a particularly powerful site for him to do so."

Obama is also expected to present an impassioned plea to stop the spread of nuclear weapons so that what happened in Hiroshima and Nagasaki will not be repeated. As part of his anti-nuke effort, Obama also took a swipe before his planned visit at GOP presidential candidate Donald Trump, who has refused to rule out the use of nuclear weapons against ISIS or even in Europe.

Obama said at a press conference in Japan that world leaders are "rattled" by Donald Trump, and "for good reason."

"A lot of the proposals that he's made display either ignorance of world affairs or a cavalier attitude or an interest in getting tweets and headlines instead of actually thinking through what is required to keep America safe," the president said.

Trump responded to Obama, saying at a press conference in North Dakota: "When you rattle someone, that's good."