The United States condemned as "despicable" the Islamic State group's apparent beheading of 21 Egyptian Christians in Libya after it released a video claiming to show the killings on Sunday.

"The United States condemns the despicable and cowardly murder of twenty-one Egyptian citizens in Libya by ISIL-affiliated terrorists," White House spokesman Josh Earnest said, referring to the IS extremists.

"ISIL's barbarity knows no bounds. It is unconstrained by faith, sect, or ethnicity," Earnest added, saying the latest bloodshed "only further galvanizes the international community to unite against ISIL."

The Islamic State group in Libya released a video purportedly showing the beheading of the 21 Egyptian Coptic Christians, prompting Egypt's president to threaten a "suitable" punishment for the killings.

President Abdel Fattah al-Sisi said his country reserved the right to "punish these murderers" as he called a meeting of security chiefs and declared seven days of mourning after the video was distributed on social media.

US Secretary of State John Kerry "strongly condemned the despicable act of terror" and offered his condolences in a call with Egyptian Foreign Minister Sameh Shoukry, agreeing to keep close touch while Egypt decides a course of action, a senior State Department official said.

The footage shows the handcuffed hostages wearing orange jumpsuits being beheaded by their black-suited captors on a beach the group said was in the Libyan province of Tripoli.

"This heinous act once again underscores the urgent need for a political resolution to the conflict in Libya," Earnest said.