Tennis Canada announced the withdrawals on Tuesday, a day after Wimbledon champion and world No. 2 Andy Murray said he would not defend his Rogers Cup title this year.
World No. 3 Federer is coming off a run to the semifinals at Wimbledon, where he lost in five sets to Canada’s Milos Raonic.
"I have made the tough decision to withdraw from Rogers Cup," Federer said in a statement. "Toronto is one of my favourite events on the calendar and I am disappointed that I won’t be able to compete in front of the great tennis fans in Canada.
"Looking ahead, it is best for me that I take more time after Wimbledon. I look forward to coming back to Canada next year and I wish Karl Hale and everyone at Tennis Canada a very successful tournament."
Fourth-ranked Nadal has not played since withdrawing from the French Open after sustaining a wrist injury.
"I am disappointed to announce I won’t be able to come to Toronto to play this year," Nadal said in a release. "I only started practising a week ago after my wrist injury and I am not ready to play such an important event.
"I am very much looking forward to playing in Toronto in a couple of years since I have always been treated great in that tournament and have a lot of great Canadian fans."
Top seed Novak Djokovic is still slated to compete, along with No. 7 Raonic, who is coming off his first Grand Slam final appearance at Wimbledon.
Vancouver’s Vasek Pospisil will now gain direct entry into the main draw instead of using the wild card position he was initially granted.
Can't say I'm shocked, they all want to save their energy for Rio and the U.S. Open