Gross domestic product (GDP) expanded by 0.8 percent between July and September compared with the previous quarter, adjusted for seasonal swings, the statistics office Destatis said in a statement.
“German economic growth continues at a high rate,” it said.
The preliminary figure beat expectations, as analysts surveyed by Factset had forecast 0.6 percent growth.
“Exports were stronger than imports in the third quarter. As a result, net exports had a positive impact on the GDP compared to the previous quarter,” according to Destatis.
Healthy government and consumer spending “remained rather stable” in the third quarter, it added, while noting that investments had increased, particularly “in machinery and equipment”.
Destatis also revised upwards its first-quarter figure, saying the German economy accelerated by 0.9 percent in the first three months of 2017 instead of the earlier reported 0.7 percent.
Second-quarter growth was confirmed at 0.6 percent.
“Germany's economic success story goes on and on and on,” said economist Carsten Brzeski of ING Diba bank.
He said he saw little reason to expect a sudden end to the country's “golden cycle”, given the low interest rate environment, the strong labour market and the expectation that the incoming German government would boost spending.
The German economy ministry last month sharply upgraded its full-year growth forecast to 2.0 percent, up from 1.5 percent previously.
For 2018, it is pencilling in growth of 1.9 percent.
Europe's largest economy has in recent years been powered by domestic demand, helped by record-low unemployment, low inflation and an influx of migrants in 2015.
But the economy ministry expects domestic consumption to slow down in coming years, while buoyant foreign demand for “made in Germany” goods is once again expected to become the main driver of growth.
Exports are forecast to rise by 3.5 percent this year and 4.0 percent in 2018, according to the ministry.