Australia line up Denmark friendly
The match will be played at Ruimsig Stadium in Johannesburg, Football Federation Australia said in a statement late on Thursday.
"Denmark is another World Cup qualified team that also plays a similar style to the opposition we will face in South Africa," Australia coach Pim Verbeek said.
"They are strong, physical and skilful which will benefit our preparation greatly."
The Socceroos, who have been drawn in Group D with Germany, Serbia and Ghana, have played Denmark on only one previous occasion - a 3-1 defeat in London in 2007.
Denmark are in Group E with Japan, Netherlands and Cameroon.
Australia will play their third and final warm-up with the United States at the same venue on June 5, after taking on New Zealand at the Melbourne Cricket Ground on May 24 in their farewell match before heading to South Africa.