"I wanted to find the perfect way to say this, as you so eloquently put this game to rest -- perfectly done, just like your career," she wrote on Instagram.
"I have always looked up to you and admired you. Our paths were always so similar, so much the same. You inspired countless millions and millions of people -- including me -- and we will never forget.
"I applaud you and look forward to all that you do in the future. Welcome to the retirement club. And thank you for being you."
Federer's success at Wimbledon, winning the title at the All England Club eight times, meant he became synonymous with the green grass of Centre Court. He last lifted the trophy there in 2017, 13 years after his first Wimbledon win.
"Roger, where do we begin?" the tournament's official page wrote. "It's been a privilege to witness your journey and see you become a champion in every sense of the word.
"We will so miss the sight of you gracing our courts, but all we can say for now is thank you, for the memories and joy you have given to so many."
Seven-time Super Bowl champion Tom Brady said in a press conference on Thursday: "Phenomenal, great player, you know, he's just a great competitor and you know ... he had a great run, he was great, always respectful of everybody and meant a lot."
Tennis pioneer and Hall of Famer Billie Jean King wrote on Twitter: "Roger Federer is a champion's champion. He has the most complete game of his generation & captured the hearts of sports fans around the world with an amazing quickness on the court & a powerful tennis mind. He has had a historic career w/memories that will live on and on.
"Congratulations @rogerfederer. We wish you the very best as your journey continues."
Current women's world No. 1 and three-time grand slam champion Iga Swiatek added: "I just want to thank you for everything you've done and everything you are for our sport. It's been a privilege to witness your career. I wish you all the best."
Two-time NBA champion and six-time All-Star Pau Gasol said: "Thank you for inspiring us and setting a great example for all of us."
In a statement posted on the official Olympics Twitter page, International Olympic Committee President Thomas Bach said, "@RogerFederer is a gentleman on and off the court -- and a true Olympic champion. Congratulations Roger on your outstanding career, good luck for the future. Hope our paths will cross again."