Substitute Andre Schurrle and Ozil scored the goals and although Algeria got one back late on, the Germans held out for a tense victory.
The quarterfinal against France, played in the heat of Rio, was a rather turgid affair with Hummels' early header enough to secure a 1-0 win.
The 7-1 win over Brazil was achieved after Germany raced into a 5-0 lead by the interval following a mediocre defensive display from the host nation.
So poor was Brazil's performance that Muller revealed how the German players made a decision to ease off in the second half so not to embarrass its opponent.
"With the score the way it was, we said we should avoid being arrogant and to refrain from humiliating the opponent," he told reporters.
"But that's something obvious. Yes, there was this agreement and it came from the players themselves."
There's little chance of Germany letting up against Argentina when the tournament's top two go head-to-head.
Alejandro Sabella, who will leave his role as coach after the final, has led his side through to the final following a hard-fought campaign.
In all of its three group games, only one goal separated Argentina from its rivals.
After beginning with a 2-1 win over Bosnia and Herzegovina, Argentina was made to sweat until the very last minute against Iran before Messi curled home a stunning winner.
Against Nigeria, it was given a real fright before edging home 3-2 courtesy of Marcos Rojo's close-range effort.
Having topped Group F, Argentina progressed to face Switzerland which was defeated by a goal just two minutes before the end of extra-time.
Another 1-0 victory secured a semifinal place as Gonzalo Higuain's strike ensured Belgium was put to the sword.
The semifinal showdown against the Dutch was a dull affair with neither side managing to produce its best football.
Sergio Romero, the Argentine goalkeeper, became the hero after saving two penalties in the shootout before Maxi Rodriguez struck the winning kick.
It sparked wild scenes of jubilation, not just in Sao Paulo but across Argentina where 40 million people celebrated the nation's Independence Day with extra fervor.
"Brasil, Decime Qué Se Siente" --- translated to "Brazil, Tell Me How It Feels" -- is the song that has been sung throughout the tournament by Argentine fans confident of their team's success.
Much of Argentina's success will depend on Messi -- a man who has already scored four goals in the tournament and will captain the side in his 93rd international appearance.
Messi's achievements are well known -- 381 goals in 466 matches for Barcelona, three European Champions League titles and six Spanish La Liga triumphs only tell half the story.
Now he is aiming to add to his 42 international goals by inspiring Argentina to the biggest prize of all -- and the one which will surely make him one of the greatest players of all time.
No European country has ever won the World Cup in South America -- if Messi gets his own way, that statistic won't change any time soon.
As for millions of Brazilian football fans, who had so desperately sought a sixth world crown, Sunday is the party invitation they had could have done without.
Rizzoli to referee final
When it comes to famous football referees, Pierluigi Collina -- now retired -- might be the most famous of them all.
FIFA chose another Italian, Nicola Rizzoli, to take charge of Sunday's final.