Celia Sasic scored twice with Anja Mittag and Dzsenifer Marozsan also finding the net to put the 2003 and 2007 champions through to the last eight for the seventh time in as many editions of the tournament.
The 30-year-old Mittag set Germany on their way with a solo run through the Swedish defence following a defensive error after 24 minutes at Ottawa's Lansdowne Stadium.
It was the fifth goal in four matches for Mittag who recently signed for Paris Saint-Germain from Swedish club FC Rosengård.
And 12 minutes later Sasic notched her first when she slotted in a penalty awarded after Mittag was fouled inside the box by her former FC Rosengard teammate Amanda Ilestedt.
Leonie Maier almost got a third just before the break only for her long range effort to go straight into the hands of Hedvig Lindahl in the Swedish goal.
Sasic grabbed her second on 78 minutes with a diving header after Simone Laudehr's initial effort had come back off the post.
Defender Linda Sembrant scored a consolation goal for the Swedes with eight minutes to go, only for Marozsan to pick up another for the Germans two minutes from time.
Germany next play either France or South Korea, who clash in Montreal on Sunday, for a place in the semi-finals.
Sweden, ranked fifth, return home without a win after advancing to the last 16 as one of the best third-place finishers following three draws in their group.
It is the third time that Germany have beaten their European rivals in a major competition.
In 2003 Germany won the world title by beating Sweden with a golden goal in the final, while more recently Germany beat Sweden 1-0 in the semi-finals on their way to the European title.