The rise in domestic demand, however, overshadowed a drop in foreign trade, Destatis reported, saying the price-adjusted quarterly increase in imports was considerably larger than that of exports.
Germany's growth performance did little to alter the path of the euro, which has moved tentatively lower since the beginning of August.
"With today's strong growth data, it will be hard for any opposition party to pick out the economy as a main theme for the final stage of the election campaign", said Carsten Brzeski at ING.
"All things considered, we remain optimistic about the eurozone economy, and forecast above-consensus growth of 2.2 percent this year and 2 percent in 2018", said Jack Allen, European economist at Capital Economics.
The Statistics Office said that growth in the April-June period was mainly driven by domestic demand as households and state authorities increased their spending and companies boosted investment in buildings and equipment.
Auto plunges from a seventh floor parking lot in Austin
Police said as the auto flung to the ground, it hit the building across the alleyway, rupturing a gas line. The driver of the vehicle reportedly suffered "serious injuries" from the crash, KXAN reported .
Year-on-year growth came in at 2.1 per cent, the best rate in three years.
The Federal Statistics Office said Tuesday the GDP growth followed an upwardly revised 0.7 percent growth in the first quarter, according to figures adjusted for seasonal and calendar variations.
Germany's economy hence lagged behind the USA, which expanded at an annualized pace of 2.6% in the same period, but slightly outpaced the 2.3% growth in the 19-country euro currency zone. She's seeking a fourth term in September.
The preliminary estimate showed GDP growth rose by 0.6% between April-June compared with the same period previous year.
The euro has also risen about 10 percent against the dollar this year to a 30-month high above $1.19 earlier this month on the back of strong eurozone economic data, waning fears of a wave of populist politicians taking power across Europe, as well as uncertainty over the economic program of U.S. President Donald Trump.