"The first set was really good tennis," Federer, a four-time winner of the tournament, said.
"I played well throughout and was able to serve better than Jack today."
Federer blasted eight aces, had no double faults and broke Sock three times in the 69-minute match.
He clinched the victory when Sock slammed a backhand into the net on match point.
The Swiss star next faces Czech ninth seed Tomas Berdych.
"The opponents are getting tougher as you get into the back end of the tournament," Federer said.
Federer and Berdych have met 18 times with the Swiss holding a 12-6 lead.
They met last year in the Dubai final where Federer won in three sets.
Meanwhile, Serena Williams won the clash between two of the hottest women players on the WTA Tour with a straight-set victory over Swiss Timea Bacsinszky at Indian Wells on Wednesday.
World number one Williams extended her match win streak to 15 by beating the red-hot Bacsinszky 7-5, 6-3 on the Tennis Garden stadium court.
"She was on a winning streak, so I was like, 'I hope I win tonight, because she hasn't lost in a really long time,'" Williams said of Bacsinszky, who was came into the tournament off back-to-back WTA titles in Acapulco and
Bacsinszky's fourth round win over Elina Svitolina was her 15th consecutive match win, including Fed Cup play.
Williams now faces third seeded Simona Halep after the Romanian beat Spain's Carla Suarez in three sets.
Williams is playing in her first tournament since winning a sixth Australian Open crown in January, her 19th Grand Slam title.
She is making a celebrated return to Indian Wells after being booed in the 2001 final.
The hostile reception from the crowd resulted in Williams' 14-year boycott of the Indian Wells event but she now says she is happy to be back.
Bacsinszky, 25, has had her own personal demons to deal with after a bitter parting from her father.
She said her dad pushed her into tennis so he could live his dream through her.
She even quit the game for awhile, but her successful return has been one of the feel good stories on the WTA Tour this year.
She has climbed the rankings and is now 27th in the world after being ranked 285th in 2013.