The German economy picked up more steam than expected in the second quarter, driven by higher household and state spending, data showed on Tuesday, suggesting that Europe's biggest economy is powering ahead despite trade-related business uncertainties.

Gross domestic product expanded by 0.5 per cent quarter-on-quarter, the Federal Statistics Office said. That compared with a Reuters forecast of 0.4 per cent.

The office also revised up the quarterly growth rate for the first three months of the year to 0.4 per cent from 0.3 per cent.

"Despite all of the prophecies of doom, the upswing is not only alive; it's also kicking," Bankhaus Lampe economist Alexander Krueger said.

"For the time being, the upswing is unlikely to be stalled by the global trade dispute or overheating," Krueger said. But he added that the conflict with the United States over tariffs was clouding the outlook for the second half of the year.

On the year, the German economy grew by 2.0 per cent from April to June, calendar-adjusted data showed. Analysts polled by Reuters had expected 2.1 per cent.

The Statistics Office said that economic growth was mainly driven by higher household spending and increased state consumption. Additional impetus came from investments.

Exports also grew but were outperformed by even stronger imports growth, suggesting that net trade did not contribute to overall economic growth, the office said.

The figures underpin a gradual shift in the German economy away from its traditionally export-oriented growth model towards a more domestically driven upturn propelled by record-high employment, rising wages and booming construction.

"The German economy has shifted into a higher gear and picked up speed considerably in spring," Unicredit analyst Andreas Rees, pointing to strong domestic activity and vibrant household spending.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.