A third-minute goal from Lindsey Horan and an own goal from Swedish defender Jonna Andersson in the 50th minute were enough to secure an American victory and set up a Round of 16 matchup against Spain on Monday in Reims -- and a possible quarterfinal showdown against host nation France the following Friday in Paris.
"We needed this next level and we responded to that. That's the ignition we needed," U.S. coach Jill Ellis said.
Sweden is to face group E runners-up Canada in Paris on Monday night, with a possible matchup against two-time winners Germany looming in the quarterfinals a week from Saturday in Rennes.
The Americans capped group play by setting more Women's World Cup records. Andersson's own goal was the 18th scored by the U.S.women in their group games, breaking the previous record of 17 set by Norway in 1995. The U.S. also made it through the group stage without conceding a goal for the first time in the World Cup and won all three group games at the World Cup for the first time since 2003.
The win also vanquished some personal demons for the U.S., who had not beaten Sweden in World Cup play since 2007 and lost to the Scandinavians on penalties in the quarterfinals of the 2016 Olympic tournament in Rio de Janeiro.
"We've been part of some very big games against them, and we haven't beaten them in a major tournament in a while, so it feels good that we can go into this tournament and we can play well against a quality side and get a result," defender Becky Sauerbrunn said.
The U.S. starting lineup was similar to that used in the 13-0 thumping of Thailand in the tournament opener. Midfielder Carli Lloyd, who played every minute of the 2015 World Cup and scored three goals in a 5-2 victory over Japan in the title match, came in off the bench to start the second half to replace Alex Morgan, who was involved in a couple of collisions in the first half and at one point held her right knee.
A hip contusion kept defensive midfielder Julie Ertz out of the game after she started in the first two and scored her first World Cup goal against Chile.
"Alex took a knock in the first half and it was just, 'Let's be smart about this.' Similar vein to Julie. It is a zero risk game in terms of having players available for the next round," Ellis said.
Sweden coach Peter Gerhardsson made seven lineup changes for Thursday's game, telling reporters he did so with an eye toward the next game.
"We know that we have a new match on Monday, which is a knockout match, and that's the one that's the most important one," he said.
The U.S. was on the attack from the start and went ahead early when Horan scored on a corner kick from Megan Rapinoe that bounced twice past two defenders and deflected off Samantha Mewis just 2:40 into the game. It was Horan's second goal in France and the earliest goal of the tournament so far.
American goalkeeper Alyssa Naeher didn't face her first challenge until the 21st minute when she stopped a shot from Kosovare Asllani.
Tobin Heath dribbled in front of Andersson then blasted an angled shot in the 50th minute from eight yards out that went over goalkeeper Hedvig Lindahl at the near post. The goal was reviewed by VAR after it appeared Lloyd was offside. It was later determined to have come off Andersson for an own goal.
Lloyd was denied by Lindahl in the 90th minute, stopping her World Cup-record scoring streak at six games.
The Associated Press contributed to this report.