The IS Libya branch said "soldiers of the caliphate" attacked the empty mission in a message posted on Twitter, together with a photograph of a tree-lined street with a fire in the background.
There was no independent confirmation of the claim -- reported by the US-based monitoring group SITE Intelligence.
The IS posted a similar claim for a December 27 car bomb attack outside the building of a Libyan unit tasked with securing diplomatic missions that left no casualties, SITE reported at the time.
The assailants threw "a bag full of explosives from a passing car at a police car parked near a guard post", he said, adding that the attack caused damage to the building and parked cars.
But in the brief tweet, the IS said the blast was caused by an explosive device planted by its militants under the guard station.
Foreign Minister Ramtane Lamamra of neighbouring Algeria condemned the bombing. "Any attack on a diplomatic post is a crime under international law," he said.
The oil-rich nation has been wracked by conflict since dictator Moamer Kadhafi was toppled and killed in a 2011 uprising, with rival governments and powerful militias battling for control of key cities and the country's oil riches.
The foreign ministry of Libya's
internationally-recognised government denounced Saturday's bombing as a "cheap attempt to influence the national dialogue in Geneva" that are to continue next week.
The Algerian embassy, like most foreign missions in the Libyan capital, was closed last year as militias battled for control of the city.
UAE Foreign Minister Abdullah bin Zayed al-Nahayan blamed those attacks on Fajr Libya and Ansar al-Sharia.
Washington has blacklisted the radical Ansar al-Sharia as a terrorist group for its alleged role in a deadly 2012 attack on the US consulate in the eastern city of Benghazi.
