Nadal dominated from the start, breaking Sousa in his first two service games to take a 4-0 lead in the first set. The Spaniard never faced a break point and converted six of the eight he created on Sousa's serve.
He earned a standing ovation from parts of the crowd after setting up one of those break points, ending a 20-shot rally with a running backhand crosscourt winner to make it 30-40 at 1-1 in the third set. He hit another backhand winner to secure the break and broke again for a 5-2 lead.
It was the two-time Wimbledon champion's 52nd match win at the All England Club; he surpassed Bjorn Borg for eighth place on the all-time list.
Djokovic dominates Humbert, advances to Wimbledon quarterfinals
Novak Djokovic bests Ugo Humbert in straight sets to advance to his 11th Wimbledon quarterfinal.
Djokovic, who beat Kevin Anderson in last year's final, reached his 11th Wimbledon quarterfinal. That puts him level with Boris Becker at fourth place on the all-time list.
Goffin beat Fernando Verdasco 7-6 (9), 2-6, 6-3, 6-4.
Federer delivered another vintage Centre Court performance to reach a record-extending 17th Wimbledon quarterfinal.
Federer ousted 17th-seeded Matteo Berrettini 6-1, 6-2, 6-2 in a match that only lasted 1 hour, 14 minutes.
The eight-time Wimbledon champion lost only one point on his serve in the first set and didn't face a break point until he was up 3-0 in the third. He saved that one and went on to serve out the match at love.
The 37-year-old Federer became the oldest man to reach a Grand Slam quarterfinal since Jimmy Connors did it at 39 at the 1991 U.S. Open. Federer faces No. 8 Kei Nishikori next.
Nishikori advanced by beating Mikhail Kukushkin 6-3, 3-6, 6-3, 6-4.
The 26th-seeded Argentine defeated last year's runner-up Kevin Anderson in the previous round, a year after beating 2017 finalist Marin Cilic. The 15th-seeded Raonic served for the set at 5-3 in the fourth set but was broken.
The Canadian then saved one match point at 5-4 in the decider and two more at 6-5. But Pella converted his fourth chance when Raonic hit a half-volley into the net.
In men's doubles, the Bryan twins are out of the competition after losing in the third round.
Bob and Mike Bryan lost to French duo Nicolas Mahut and Edouard Roger-Vasselin 7-6 (3) 6-2, 4-6, 7-6 (5). Bob missed last year's tournament after having hip surgery, but Mike won the doubles title with replacement partner Jack Sock.
As a pairing, the American brothers have 16 Grand Slam doubles titles, including at Wimbledon in 2011 and 2013.
The Associated Press contributed to this report.