The country's trade gap stood at 517.4 billion yen ($6.53 billion) last month after a ¥60.3 billion surplus in June.
Exports fell 8 percent from a year earlier in July to 5.3 trillion yen ($66.9 billion), while imports rose 2 percent to 5.83 trillion yen ($73.6 billion).
Japanese exports to China—the nation's largest trading partner—fell 11.9% in July, the sharpest since a 14.0% drop in February and the second-straight monthly drop. Japan's overall trade balance with China stood at a deficit of ¥250.1 billion, the fifth-consecutive monthly shortfall.
Japan is taking a direct hit as well. It ran the biggest deficit on record with the European Union in July, worth ¥95.3 billion, the data showed.
