Brazil will tackle China in a friendly international on September 10 in the north-east city of Recife, three days after facing South Africa in Sao Paulo, the Brazilian football federation (CBF) said.
"It gives us pleasure to announce that Brazil will play China in Recife as part of our preparations for the Confederations Cup and the 2014 World Cup," said CBF president Jose Maria Marin.
The game against China will be at the 62,000-capacity Arruda Stadium.
Recife is one of the cities hosting the World Cup and possibly matches in the Confederations Cup in November, 2013, if FIFA finds that building work at the ground had been completed.
On September 7, Mano Menezes's Brazil team will face South Africa in Sao Paulo.