Month-on-month growth in clothing stores was down 1.9% while food sales dropped by 0.6%, according to the Office for National Statistics (ONS).
But the falls were offset by strong growth in household goods stores at 4.5% and other non-food stores at 2.8%.
The unexpected rise in retail sales saw the pound rise a percentage point against the dollar at 1.327.
The latest relatively positive statements from the EU on Brexit, suggesting that a deal could be struck with the UK by October, did nothing to stem sterling’s rise.
Online spending continued to increase to reach a record 18.2% of all retailing.
Strong online growth in department stores also saw a record proportion at 18.4%.
Tom Stevenson, investment director at Fidelity International, said: “The headline level of retail sales data was unexpectedly strong for August, although buoyant household goods volumes were offset by declines in food, clothing and petrol.
“Food and clothing retreated after benefiting from the unusually warm weather in July. The rising cost of fuel is also starting to bite.
“So this is a mixed bag, which paints an unconvincing picture of recovery on the UK’s struggling high streets.
“To add to the cocktail of concerns for the British high street, yesterday’s inflation data showed that price rises are once again outstripping our pay packets.
“The continued pressure on households’ disposable income means we are likely to see consumers start tightening their belts again.”
Details of the slowdown in clothing retail were released on the day that UK high street fashion label French Connection announced a pre-tax loss of £15.1m for the six months to July 31, against losses of £5.9m a year earlier.
The company had a number of writedowns, including an £800,000 hit related to House of Fraser’s collapse, where it had a concession, as well as store leases.
The group said like-for-like sales tumbled 7% across the UK and Europe over the period in “difficult trading conditions”.
Shares in the retailer slumped 9% after the results.
French Connection chairman and chief executive Stephen Marks said: “There is no doubt that progress has not been helped by the trading conditions in which we operate in the UK, although we can take great confidence from the performance of the wholesale business and the stability of the licence income.”