Nadal's potentially tricky test against Bernard Tomic ended when Tomic retired a set down, while Federer swept James Duckworth aside in straight sets.
Nadal had been handed a tough draw against Australian Tomic, the world number 57 who was once as high as 27.
However, after taking the first set 6-4, Nadal was granted a path to the second round when Tomic retired to boos from some sections of the crowd.
Federer, meanwhile, chasing a fifth Australian Open title, broke Duckworth once in each of the first two sets to take the sting out of any challenge from the 21-year-old, before easing through the third set despite the heat.
It was the sixth seed's first competitive match since six-time Grand Slam champion Stefan Edberg joined his coaching set-up.
Frenchman Jo-Wilfried Tsonga and Argentine, Juan Martin Del Potro also made the second round, but 13th seed John Isner went out.
On a day when temperatures reached 42C, Maria Sharapova, Victoria Azarenka and Caroline Wozniacki also went through.
Britain's Andy Murray made the ideal start to his Australian Open campaign with a quick win over Japan's Go Soeda in searing heat.
On a day that saw the temperature exceed 40C, the Wimbledon champion spent just 87 minutes securing a place in round two with a 6-1 6-1 6-3 victory.
Source: BBC SPORTS