Defending champion Novak Djokovic will have world number fourAndy Murray in his top half of the men’s singles draw, while world number two Nadal and third seed Federer were placed in the bottom half.
It is the first time since the 2005 French Open that 16-time grand slam champion Federer and 10-time major winner Nadal have been pitted in the same half of a grand slam draw.
Djokovic, who won three of the four grand slams and five Masters titles in 2011, will begin his Australian Open title defence against Italy’s Paolo Lorenzi.
Nadal and Federer will start against qualifiers, while Murray, bidding to become Britain’s first male major-winner since Fred Perry in 1936, takes on American Ryan Harrison.
Djokovic is drawn to face Spanish fifth seed David Ferrer in the quarter-finals and Murray could face former finalist Jo-Wilfried Tsonga, the French sixth seed in the last eight.
Federer could play American eighth seed Mardy Fish in the quarters, while Nadal is drawn to face Czech seventh seed Tomas Berdych.
The Australian Open gets under way on Monday.