The Danes were eliminated after the two teams finished their Group B campaigns. Lukas Podolski opened the scoring for Germany in the 19th minute and Lars Bender slotted home the winner in the 80th after Michael Krohn-Dehli had equalized for Denmark in the first half yesterday.
"It's absolutely a day of joy," Bender said. "I'll be thinking back to this day a long, long time. We have a positive spirit in the team."
Germany played without flair, but controlled possession and were never really challenged by the Danes, who go home after stunning the Netherlands in the first match but losing to Portugal in the second. "We can be satisfied with our effort but not with the result," Denmark midfielder William Kvist said.
"I think we proved that we can play against the big teams. We won (against the Netherlands) and we didn't lose big. We showed that we can play against the best."
Germany seized the initiative from the kickoff and came close twice before Podolski, playing his 100th international match, scored his first goal of the tournament.
Mario Gomez set him up with a deft backheel touch following Thomas Mueller's low cross from the right flank.
Denmark replied just five minutes later with Krohn-Dehli heading in the equalizer from a set piece that stunned the German defense. A corner found Nicklas Bendtner who headed the ball into the area where Krohn-Dehli nodded home his second goal at Euro 2012.