Japan posted a merchandise trade deficit of 18.711 billion yen in August, the Ministry of Finance said on Wednesday.