A solitary break in the fourth game was enough for the Swiss world No.2 to take the first-set 6-3.
And he looked set to storm through the second as he served for the match with a double break at 5-2 in the second.
However, Stepanek then showed some resistance to break the record 17-time Grand Slam champion for the only time in the match.
The Czech's fightback didn't last long though as Federer broke again in the very next game to seal a third round tie against either Japan's Kei Nishikori or Viktor Troicki of Serbia.
Federer's Swiss colleague, Stanislas Wawrinka, ranked number 15 in the world, continued his fine form after winning the Portugal Open last week with a comfortable 6-4, 6-4 win over Romanian qualifier Marius Copil.
Andy Murray also claimed a victory but was made to struggle at times by World No.26 Florian Mayer, before coming through in two tie-breaks.
Mayer was made to rue numerous opportunities to have taken the first set as he passed up five set points in the tie-break before world No.3 Murray made sure with a crosscourt forehand on his second set-point.
The German surged ahead at the start of the second set and led 4-1 before Murray broke back for the first time in the match at 4-2 to force the game into a second tie-break.
And the Briton was far more dominant at the second time of asking as he began to read Mayer's serve to good effect and wrapped up the tie-break 7-3 to move into round three, where he will meet France's Gilles Simon.
Earlier, Serbian World No.9 Janko Tipsarevic became the first seed in the men's event to fall on Tuesday morning as he was beaten by clay court specialist Juan Monaco 7-5, 6-3.
And eighth seed Richard Gasquet also suffered an early exit as the Frenchman was beaten 7-5, 3-6, 6-4 by Spaniard Daniel Gimeno-Traver.