Fourth seed Novak Djokovic also reached the last eight with a 7-5, 6-3 win over Jeremy Chardy of France.
Federer had to come from 3-1 down in the final set to beat Spaniard David Ferrer 3-6, 6-3, 6-4, while number two Murray hammered Czech Radek Stepanek 6-4, 6-1.
In the quarterfinals, Federer will play former world number one Lleyton Hewitt after the Australian saw off American Sam Querrey 6-1, 2-6, 6-3. Murray will play Julien Benneteau in the last eight after the Frenchman beat Spaniard Guillermo Garcia-Lopez 4-6, 6-4, 7-6.
Nadal recovered from a slow start to beat Frenchman Paul-Henri Mathieu 7-5, 6-2 to set up a quarterfinal against Czech Tomas Berdych, a 6-4, 6-3 winner over Chris Guccione. Djokovic will play ninth seed Gilles Simon who edged out Nikolay Davydenko of Russia 6-7, 6-4, 6-4.
Paes-Dlouhy ousted
Leander Paes and his Czech partner Lukas Dlouhy have been shocked by Spaniards David Ferrer and Tommy Robredo 2-6, 4-6 in the pre-quarterfinals of the at the ATP World Tour Masters 1000 tennis tournament in Ohio.
Sharapova advances
Russian Maria Sharapova and Serbia's Jelena Jankovic waited for a deadly storm to pass before thundering into the Toronto Cup quarterfinals on Thursday. Sharapova booked her spot in the last eight with a 6-2, 7-6 win over seventh seed Vera Zvonareva.
Fifth seed Jankovic battled to a 1-6, 6-3, 7-5 win over Belgian Kim Clijsters.
Sharapova will now play Polish 14th seed Agnieszka Radwanska, who advanced with a 7-5, 6-3 win over Ukraine's Kateryna Bondarenko. Jankovic will take on Russian Alisa Kleybanova, who beat France's Aravane Rezai 6-3, 6-4.
World number two Serena Williams raced into the quarterfinals with a 6-1, 6-4 demolition of Ukrainian Alona Bondarenko. The American next plays Lucie Safarova, a 7-6, 6-4 winner over China's Zheng Jie.
Fourth seed Elena Dementieva booked her spot in the last eight with a ragged 6-1, 1-6, 6-4 win over Israel's Shahar Peer.
Reuters
Deccan Herald is on WhatsApp Channels| Join now for Breaking News & Editor's Picks