Japan's Prime Minister Shinzo Abe has vowed to stand firm after the Islamic State group threatened to kill two Japanese nationals, saying he would not freeze a multi-million dollar aid package.

His remarks were made several hours after the jihadist group released a video threatening to kill Japanese hostages Kenji Goto and Haruna Yukawa if Tokyo did not pay a $200 million ransom within 72 hours.

An IS militant said in the video that the ransom demand is to compensate for non-military aid that Mr Abe pledged on Saturday to countries affected by the militant group's bloody expansion in Iraq and Syria.

"Making threats by taking people hostage is an unforgivable terrorist act about which I feel strong anger," Mr Abe told reporters at a news conference in Jerusalem, his words relayed through a translator.

"I strongly demand that they not be harmed and that they be immediately released," he said.

"The international community will not give in to any form of terrorism and we have to make sure that we work together," he said at the news conference.

And he said Japan's pledge of aid would not be affected.

"This $200 million package for refugees and displaced persons is absolutely necessary (for them)... in order to survive," he said.

"This position is unshakable, it is not to be changed," he said, stressing that the money was to help those made homeless by the conflict in Iraq and Syria.

"We shall implement this steadily."

The Japanese leader said two teams had been set up to handle the hostage crisis, one within the cabinet and one within the foreign ministry.

He said he was sending State Minister for Foreign Affairs Yasuhide Nakayama, Japan's deputy foreign minister, to Jordan to speak with the government there and to gather more information about the situation.

"I will take the leadership to solve this problem," Mr Abe said.

Mr Abe then headed to the West Bank city of Ramallah where he met Palestinian President Mahmoud Abbas.

He was to fly back to Japan later in the day, several hours earlier than scheduled.