Striker Leandro Damiao set up midfielder Danilo to open the scoring and then claimed his second of the tournament before the break.
Tottenham's Sandro added a third in the second half to cement the win which will see his side take on Honduras in the last eight.
Neymar should have made it 4-0, only to sky over an empty goal from Rafael de Silva's cross, but Alex Sandro's afternoon took a turn for the worse 15 minutes from time when, having been booked earlier for a foul, he was yellow-carded for a second time.
Great Britain's men followed the women into the quarter-finals as Daniel Sturridge netted the only goal against Uruguay at the Millennium Stadium.
The win has set up a last-eight meeting with the Republic of Korea in Cardiff on Saturday evening.
Meanwhile, Senegal joined GB in the last eight after leading striker Moussa Konate rescued a point against UAE.
Konate scored his fourth goal in three Group A matches early in the second half to cancel out Matar Ismaeil's opener. It meant that Senegal finished in second spot on five points - behind GB - and they will face Mexico in the quarter-finals.
Egypt qualified for the last eight, where they will face Japan, with a deserved 3-1 win over Belarus at Hampden Park.
The North Africans struggled to break down a dogged Belarusian side in the opening period but got the all-important breakthrough 11 minutes after the break as Mohamed Salah sweetly controlled a long ball through the middle and slotted home his third goal of the competition.
Goals from Marwan Mohsen and Mohamed Aboutrika made it 3-0, before Andrei Voronkov pulled one back with a fine header three minutes from time.
Japan and Honduras both qualified for the last quarter-finals after fighting out a goalless draw, while Republic of Korea progessed despite a disappointing draw against Gabon at Wembley.
Pre-tournament favourites Spain bowed out of the competition without a goal to their name following a goalless draw with Morocco.
Oribe Peralta's second-half strike saw Mexico top Group B with victory over Switzerland at the Millennium Stadium.