Federer, 36, is currently enjoying a two month break as he rests and recovers during the clay-court season.
The Swiss star started 2018 in top form as he won the Australian Open to take his career Grand Slam tally up to 20.
Success at the Rotterdam Open and an Indian Wells final appearance swiftly followed before a shock defeat to Thanasi Kokkinakis at the Miami Open caused him to hand the world No 1 crown over to Rafael Nadal.
Federer has not played a tennis match since and supporters have eagerly awaited his return as they watch Nadal wrap up consecutive ATP tour wins in Monte Carlo and Barcelona.
It is likely the Spaniard will also defend his French Open title later this month, but then Federer plans to return when the grass season gets underway in Germany on June 11.
“Excited to announce that I will be coming back to Germany for the Mercedes Cup in June,” Federer wrote on Facebook this morning.
“Looking forward to seeing you at the grass courts in Stuttgart.”
The Stuttgart Open, otherwise known as the Mercedes Cup, was played on clay until 2015.
However, its decision to revert to grass has drawn a number of top players as they begin their Wimbledon preparations.
Federer’s choice to skip the clay season over the past two years has caused much debate by tennis fans.
But arch-rival Nadal says he understands why the world No 2 made the decision.
“I understand that Federer must think that it is a major wear to play on the ground,” Nadal said.
“He has a fantastic winning dynamic and that in clay he can lose more games and lose that aura of unbeatable that he maintains on other surfaces.
“I think those two factors together lead him to make the decision.
“It is respectable, and while it works… In 2017 it was perfect.”