Second seeded Federer, bidding to become the first man to win eight Wimbledon titles and take his majors tally to 18, enjoyed a 67-minute 6-1, 6-3, 6-3 win over Damir Dzumhur of Bosnia, the world number 88 he beat at the French Open this year.
Federer will face Sam Querrey of the United States for a place in the last 32.
"I was happy I played aggressive. I was always going to miss playing that way a little bit but also he hung around," said the 33-year-old Swiss.
Nadal, defeated in the second, first and fourth rounds in the last three years, reached the second round with a 6-4, 6-2, 6-4 win over Thomaz Bellucci, his fifth win in five meetings against the 42nd-ranked Brazilian.
More From This Section
Tenth-seeded Nadal, his lowest ranking for a decade, faces Germany's Dustin Brown for a place in the last 32.
Defending women's champion Petra Kvitova, the second seed, took just 35 minutes to reach the second round, cruising to a 6-1, 6-0 win over Kiki Bertens, the world number 108 from the Netherlands.
"It's great to be back on Centre Court and unbelievable to see all the people clapping," said the Czech, who had been laid low by illness in the week before the tournament.
Kvitova's only dropped point on serve came on a double fault in the final game of the match.
The powerful 25-year-old left-hander would have been relieved to have enjoyed a brief first round outing as temperatures rocketed to around 30 degrees Celsius.
Tomorrow is expected to see a Wimbledon record high of around 35 degrees which would require the heat index, where matches are briefly suspended, to be consulted.