The 20-time Basel-born Grand Slam champion is 155 points behind old rival Rafael Nadal in the rankings, with 180 points up for grabs for reaching the last four in the Netherlands.
It will be the 36-year-old's first tournament since winning a record-equalling sixth Australian Open title last month with a five-set victory over Marin Cilic.
"The tournament is special for me," Federer, a two-time winner in Rotterdam, said in a statement.
"I remember playing for the first time in 1999 as it was one of the first events where I got the chance to play at the highest level.
"It feels good to join in the celebrations of the 45th edition."
American Andre Agassi has held the record as the oldest top-ranked men's player in history since achieving the feat aged 33 years and 131 days in 2003.
Federer could beat Agassi's mark by more than three years. The last time he held the number one spot was in 2012.
The Swiss great completes a strong field for the Rotterdam event, joining compatriot Stan Wawrinka, world number four Grigor Dimitrov, Alexander Zverev and defending champion Jo-Wilfried Tsonga in the draw.