Federer has not played tennis since losing to Australian Thanasi Kokkinakis in three sets at the Miami Open on March 24.
But he will face either Mischa Zverev or a qualifier in the Stuttgart Open second round.
Today Federer made his first appearance on the grass as he practised with Philipp Kohlschreiber.
And Federer took to the court in Nike apparel amid shock reports he is on the brink of signing a huge deal with Japanese brand Uniqlo worth $30m (£22.3m) a year.
In 2008, Federer signed a 10-year deal with Nike worth more than $10million a season.
But his contract ended in March and it appears he could be making a surprise switch.
And while Federer was practising on the grass, his great rival Rafael Nadal was busy winning the French Open for the 11th time.
Nadal beat Dominic Thiem 6-4 6-3 6-2 in the final to continue is incredible dominance on the clay.
Nadal said: “Well played Dominic. He played a great few weeks. He is one these of players the tournament needs. I am sure you will win here in the next couple of years. It was the best match of the tournament for him.
“It was important to play the way I did. It was a tough moment when I got cramp. He is a player who pushes you to the limit. Overall, it’s a dream to win 11 times.”