Germany was below par for much of the match and had to wait until extra time to finally open the scoring through substitute Schurrle in the 92nd minute.
Ozil added a second goal in 119th minute, and it proved crucial, as the Desert Foxes continued to press and found a goal one minute later through Abdelmoumene Djabou before time ran out and Germany was able to breathe a sigh of relief.
The Germans will now face France in the quarterfinals on Friday, while Algeria is out after nearly becoming the fourth African nation to reach the last eight at the World Cup.
More to follow...
Celebrity Families of 2014 [PHOTOS]