China's trade surplus with the United States eased in July after President Donald Trump imposed tariffs on Chinese goods in a showdown between the world's two biggest economies, official data showed Wednesday.

The Asian giant posted a $28.1 billion surplus last month after reporting a record $28.9 billion in June according to Chinese customs data.

The dip is unlikely to ease tensions with the White House, which on July 6 imposed 25 percent tariffs on $34 billion of Chinese products entering the US, triggering an instant tit-for-tat response from Beijing.

US officials said Tuesday they would slap 25 percent levies on another $16 billion worth of Chinese imports from August 23.

The move had been widely expected but with China lining up retaliatory measures it reinforced worries that the two sides are heading for an all-out trade war that could hammer the global economy.

The White House has also lined up another $200 billion worth of Chinese imports to target in future.