Federer was made to work hard by Ebden, who saved five of the eight break points he faced and was leading 5-3 in the second set.
Federer, who saved two match points against Benoit Paire in the second round the day before, recovered to go 6-5 up and then broke Ebden to take his first match point for a meeting with American qualifier Denis Kudla.
WATCH: Strokes of Genius trailer
Kudla earlier defeated Japan's Yuichi Sugita 6-2, 7-5 to book his semifinal place.
Federer, who won his 18th grass-court title in Stuttgart on Sunday, is just three match wins away from matching Jimmy Connors' all-time record of 174 victories on grass.
Federer extended his grass-court winning streak to 19 including the Stuttgart title and last year's titles in Halle and Wimbledon. He is bidding for a record-extending 10th trophy in Halle.
A LANDMARK DOCUMENTARY DURING THE MOST PRESTIGIOUS EVENT IN SPORTS, CELEBRATING THE UNPARALLELED FEDERER-NADAL RIVALRY AND 10TH ANNIVERSARY OF THE GREATEST MATCH EVER PLAYED.
In association with All England Lawn & Tennis Club, Rock Paper Scissors Entertainment and Amblin Television. Directed by Andrew Douglas.