Organisers of the Swiss Indoors announced their star attractions for the October 19-27 event in Basel. The field is headed by five-time champion Federer, Nadal and defending champion Juan Martin del Potro.
Nadal last played in Basel in 2004, losing in the first round to Rainer Schuettler of Germany.
The Spaniard also lost early to compatriot Feliciano Lopez in 2003, the only year he and Federer both played at Basel. The Swiss Indoors, played on carpet then, is now a hard-court tournament.
Nadal has a 19-10 career record against Federer, including a quarter-final win last month at the Masters event at Indian Wells, California.