The Scandinavian side needed just a draw to book their spot in the last-eight but were ruthless when presented with opportunities to score, with the first four goals all coming from set-pieces.
Filippa Angeldal scored twice in the opening half, first pouncing on a weak clearance from a corner to guide the ball into the net before the unmarked midfielder curled home a first-time effort from the edge of the box after a short free kick.
Goalkeeper Patricia Morais made a couple of decent saves to keep Portugal in the game but Sweden were relentless and another corner allowed defender Amanda Ilestedt to rise up and flick the ball home before half-time. However, Ilestedt's strike went down as an own goal off Carole Costa due to a deflection.
Sweden continued to dominate proceedings after the break and a penalty for a handball in the box allowed Kosovare Asllani to score from the spot past a diving Morais who guessed the right way.
Another effort from a free kick was ruled out by VAR for offside but Sweden finally scored from open play when Stina Blackstenius finished a flowing move in injury time by curling her shot into the top corner.
Additional reporting by Reuters.