0635 GMT October 17, 2017
Fifth seed Nadal beat fellow Spaniard Fernando Verdasco 6-3 7-5, BBC reported.
Switzerland's Federer, who won his 18th Grand Slam title with a five-set victory over Nadal in January, beat American Steve Johnson 7-6 7-6.
Novak Djokovic beat Juan Martin del Potro, while Angelique Kerber, who is set to become world number one, is out.
The German, who is guaranteed a return to the top of the rankings on Monday following Serena Williams' withdrawal from Indian Wells and the Miami Open, lost 3-6 3-6 to Russian Elena Vesnina.
Serb second seed Djokovic was hugely impressive as he won the deciding set 6-1 against Argentine Del Potro and he will play Australian 15th seed Nick Kyrgios, who earlier beat 18th seed Alexander Zverev of Germany 6-3 6-4.
"That's why I came here, to play against guys like Rafa," said Federer, 35, before a 36th meeting with Nadal, 30. "I'd better be excited now otherwise I came for the wrong reasons.
"I try to see it really as another opportunity to build upon something for the rest of the season.
"So regardless of Australia, winning or losing, I'm going to try to go out there and play free again. I think it's really important."
In earlier matches, unseeded American Donald Young beat French 14th seed Lucas Pouille 6-4 1-6 6-3 in the men's draw, while Japan's fourth seed Kei Nishikori swept past Frenchman Gilles Muller 6-2 6-2.
American 17th seed Jack Sock edged a third set tiebreak to beat Grigor Dimitrov of Bulgaria 3-6 6-3 7-6.
In the women's draw, American 12th seed Venus Williams beat Peng Shuai of China 3-6 6-1 6-3, and Czech third seed Karolina Pliskova led Timea Bacsinszky 5-1 when the Swiss retired.