Federer, the defending champion and six-time Wimbledon winner, received the top seeding even though Nadal recently supplanted him as No 1 in the world rankings.
Nadal moved into the top spot after winning the French Open, while Federer slipped to No 2 after losing in the quarterfinals in Paris.
Wimbledon uses its discretion to seed players based on their grass-court record.
"While the seeding positions of Roger Federer and Rafael Nadal are reversed from their current rankings, there is no practical effect since they remain the leading seeds in their respective halves of the draw," Wimbledon referee Andrew Jarrett said.
The draw will be held on Friday, with the two-week Grand Slam tournament starting from Monday.
There were no surprises in the women's seedings, with Serena Williams at No 1 and sister Venus at No 2.
Federer has won a record 16 Grand Slam titles, including this year's Australian Open. However, he has not won a tournament since Australia and will be coming into Wimbledon in something of a slump. He fell to Lleyton Hewitt in Sunday's final in Halle, Germany for only his second loss on grass in more than seven years.
Nadal beat Federer in the 2008 Wimbledon final but was injured and unable to defend his title last year. The Spaniard won his fifth French Open earlier this month, but lost to Feliciano Lopez last week in the quarterfinals of the Wimbledon grass-court tuneup at Queen's Club.
Novak Djokovic is seeded No 3 and Andy Murray No 4 in line with their rankings.
Three-time Wimbledon runner-up Andy Roddick was seeded No 5, two spots above his ranking. French Open finalist Robin Soderling is No 6.
One of the biggest beneficiaries of the Wimbledon seeding committee was Hewitt, the 2002 champion who was seeded No 15 despite a world ranking of No 26.
Big-serving Ivo Karlovic is ranked No 33 but was bumped up to No 25 in the seedings.
The women's seedings stuck to the world rankings, setting up the possibility of a fifth all-Williams Wimbledon final.
Serena beat Venus last year for her third Wimbledon title.
The only change in the seedings was caused by the injury withdrawal of No 5 Elena Dementieva.
Caroline Wozniacki is No 3, followed by Jelena Jankovic at No 4 and French Open champion Francesca Schiavone at No 5.
Belgians Kim Clijsters and Justine Henin, who are returning to Wimbledon after coming out of retirement, are seeded No 8 and No 17, respectively.