"Every Olympic Games has been very, very special to me", he said, adding that he figured he may as well make the announcement "while I was actually in the city where the Olympics will take place".
The two-time defending Olympic champion and three-time Grand Slam victor Murray, coming back from his January hip surgery, is yet to announce his intentions for Tokyo.
After beating American John Isner 6-3 and 7-6 in an exhibition in Tokyo, Federer commented: " For the past few months, I have been discussing with my team what I should do in the summer of 2020 between the end of Wimbledon and the beginning of the US Open and, finally, what my heart has dictated to me is that I participate in the Tokyo Olympic Games, "he said, in statements reproduced by local media".
Federer, who missed Rio 2016 through injury, did win a gold medal at Beijing 2008 in the men's doubles alongside Stan Wawrinka. "I just felt like this, for me, is something I would like to do if I am healthy". The unseeded 19-year-old reached the semifinals.
The Olympics also hold sentimental value for him - he met his future wife, Mirka Federer, in Sydney in his first Olympic appearance.
The men's singles gold-medal match in Tokyo is scheduled for August 2, four weeks before the US Open starts in NY.
Another day, another record for Simone Biles
Nagornyy scored an average 14.966 from his two vaults, beating his friend and Russian teammate Artur Dalaloyan into second place. Less than 24 hours after Max Whitlock's pommel horse gold, Fraser pipped Turkey's Ahmet Onder on the bars by 0.017 points.
"I carried the flag twice for Switzerland in Athens and Beijing, I've got a gold and a silver, and I would love to play again, so I'm very excited".
According to NBC Sports, the Olympic games also have sentimental value.
Federer said he needed time to consider the schedule and how to juggle his family life, the U.S. Open, the grass-court season and the clay-court season.
Djokovic, a bronze medallist at Beijing 2008, won the Japan Open earlier this month without dropping a set at Ariake Colosseum - the venue for next year's Olympics. The top 56 players in the ATP singles rankings will qualify as long as they are in the top four within their own country.
To fulfill the ITF participation requirements, a player must be part of a Davis Cup or Fed Cup team and present at the tie on at least three occasions in the Olympic Cycle, provided one of those ties is in 2019 or 2020.