The five-time champion had early breaks in each set for a comfortable 6-2, 6-2, 6-4 victory Wednesday.
Federer had just 10 unforced errors on Centre Court to go with 27 winners and never lost his serve.
Federer is looking for a 15th Grand Slam title, which would break the record he shares with Pete Sampras. He is the top seed in the tournament after defending champion and No. 1 Rafael Nadal pulled out because of bad knees.
"The opponents are only going to get tougher," Federer said. "I'm playing great at the moment, and I hope it's going to last."
The fourth-seeded Djokovic won eight straight games after going down 1-0 in the second set to secure a 7-5, 6-1, 6-4 victory.
The Serb threw his racket in anger after being broken to start the second set and also struggled with his serve in the third. He traded breaks twice with Greul before getting a decisive breakthrough to go up 5-4.
Djokovic lost in the second round to Marat Safin here last year, after making the semifinals in 2007. Greul had advanced past the first round for the first time in six tries at Grand Slam tournaments.
"I'll throw everything I've got at him," Fish said. "I don't have anything else to do."
French ninth seed Jo-Wilfried Tsonga did not even have to walk through the All England Club gates to book his place in the third round.
Tsonga became the first player through to the last 32 when his opponent, Italy's Simone Bolelli, pulled out with a back injury before a ball could be struck in their second-round match.
American Taylor Dent double-faulted 21 times and lost 7-5, 7-6 (6), 4-6, 6-7 (3), 6-4 to Daniel Gimeno-Traver in the completion of a first-round match suspended because of darkness.
"My bad days are pretty skanky," Dent said.
Sam Querrey lost on Centre Court to No. 11 Marin Cilic 4-6, 7-6 (3), 6-3, 6-7 (4), 6-4, and Vince Spadea's 14th Wimbledon ended when he lost to No. 29 Igor Andreev 6-3, 7-5, 6-2. That left three American men in the draw midway through the second round -- Fish, Andy Roddick and Jesse Levine.
Michael Llodra retired with an abdominal injury following a collision that involved the chair-umpire stand, a ball girl and a trash bin. At 3-all in the first set against Tommy Haas, Llodra's pursuit of a shot sent him off the court. He bounced off the stand and into the girl, and they tumbled into the trash can.
Llodra rose, helped the girl up and hugged her. He received treatment from a trainer and finished the game but then called it quits.
Information from The Associated Press and Reuters was used in this report.