Federer has long led the way for men's singles championships, yet a two-year drought allowed Nadal to close the gap.
The world number two then won the French Open final on Sunday against Novak Djokovic - a dominant 6-0 6-2 7-5 success - to match Federer's record tally.
It was a 13th triumph at Roland Garros, too, and Federer said he was only too happy to welcome Nadal to the top of the standings.
"I have always had the utmost respect for my friend Rafa as a person and as a champion," Federer wrote in a message posted to his Twitter page.
"As my greatest rival over many years, I believe we have pushed each other to become better players. Therefore, it is a true honour for me to congratulate him on his 20th grand slam victory.
"It is especially amazing that he has now won Roland Garros an incredible 13 times, which is one of the greatest achievements in sport.
"I also congratulate his team, because nobody can do this alone.
"I hope 20 is just another step on the continuing journey for both of us. Well done, Rafa. You deserve it."
Federer will end 2020 without winning an ATP Tour event as he recovers from arthroscopic knee surgery.