Bastian Schweinsteiger opened the scoring for Germany from the penalty spobefore Mario Gotze doubled the German lead, capping off a fine attacking move.
Robinho reduced the deficit on 72 minutes, slotting home a spot-kick, but Andre Schurrle restored Germany's two-goal advantage as he lashed into the top corner before Neymar scored a late consolation goal.
Bastian Schweinsteiger (pen 61')
Mario Gotze (67')
Andre Schurrle (80')
Robinho (pen 72')