The 36-year-old world number two opted to follow the same plan as last year, when he missed the European claycourt season, including the French Open, before making a comeback in Stuttgart.
Federer lost to German Tommy Haas in Stuttgart last year but the Swiss went on to win his ninth title at Halle before marching to his eighth Wimbledon triumph.
Defending champion Lucas Pouille, Canadian Milos Raonic, Next Gen ATP finals winner Hyeon Chung and Australian Nick Kyrgios will also compete at the Mercedes Cup from June 11-17.
Federer, 20-times grand slam winner, is also expected to bid for a record 10th title at the Halle Open starting on June 18.