The Office for National Statistics (ONS) said retail, food and drink production and housebuilding all helped contribute to a "stronger" summer performance following a series of challenges.
It credited hot weather after builders and retailers were hit by the effects of two so-called "Beast from the East" weather systems earlier in the year.
The cold snaps dampened consumer demand that had already faced headwinds from Brexit uncertainty.
Before the warmer weather descended, food and drink producers had also faced difficulties arising from a shortage of C02 gas.
But the ONS recorded zero growth month-on-month in August. Economists had expected a slowdown to 0.1%.
Separate figures also pointed to potential Brexit uncertainty as the trade deficit in goods with the rest of the world - the difference between imports and exports - came in slightly higher than forecast at £11.2bn for the month.
Head of GDP at the ONS, Rob Kent-Smith, said: "The economy continued to rebound strongly after a weak spring, with retail, food and drink production and housebuilding all performing particularly well during the hot summer months.
"However, long-term growth continues to lag behind its historical trend."
The hot, dry weather for kids on school holidays and others was not good news for farmers.
The ONS recorded a 0.2% dip in agriculture output in August.
The largest fall was measured for the construction sector, which saw growth contract by 0.7%.
Ben Brettell, senior economist at Hargreaves Lansdown, said of the figures: "The economic rally we saw over the summer was stronger than previously thought ...but more recent news was somewhat gloomier.
"Month-on-month output was flat for August, showing the economy could be losing momentum as we move into the autumn."
He added: "The ONS update follows a cut in the IMF's forecast for UK growth, now expected to be 1.1% this year as against a previous estimate of 1.3%.
"The IMF also warned that the UK's public finances were among the weakest in the world - it used a balance-sheet approach to show the UK government has a negative net worth of more than £2tn.
More from Business
Patisserie Valerie parent suspends share trading amid fraud probe
Regulators clear npower / SSE merger following investigation
Christian bakers win 'gay cake' Supreme Court fight
James Murdoch quits Sky as Comcast takes control
US / China trade war and Brexit threaten global growth says IMF
Big four accounting giants face fast-track competition review
"Overall though the picture is still one of muddling through. Strong growth over the summer is likely to reassure policymakers that the recent interest rate rise was warranted, but they'll be hoping to see the momentum maintained as Brexit approaches.
"Markets are still pencilling in a further rise around the middle of next year - though clearly a disorderly Brexit would pose a significant risk to that outlook."