China's trade declined abruptly in June in a new sign of weakness in the world's second-largest economy.

Exports fell by 3.1 per cent compared with a year ago and imports contracted by 0.7 per cent, customs data showed. Both figures were below private sector forecasts of low single-digit growth.

China's economic expansion has slowed this year and is expected to slow further due to weak global demand and an effort by the Chinese central bank to cool a credit boom.

Analysts had expected China to report smaller trade figures due to a crackdown on misreporting of data by exporters as a way to evade currency controls and bring extra money into the country.

But even with that taken into account, Wednesday's falling figures were below forecasts that saw exports rising by up to 3.5 per cent and imports by up to 1.5 per cent.

June's numbers were down from 13.5 per cent growth in May and imports down from 8.2 per cent growth.

China's politically sensitive global trade surplus contracted by 12.4 per cent to $27.1 billion.

Growth in exports to the United States fell to 1.8 per cent while exports to Europe contracted 3.9 per cent.