The expansion, which was in line with forecasts from leading economic think-tanks and the OECD, was driven by big increases in the rate of growth in investments and exports, officials from statistics authority Destatis said at a Berlin press conference.
Meanwhile, expansion in private and government consumption slowed compared with 2016.
Growth was also almost one percentage point higher than the 1.3-percent average recorded over the past 10 years.
And Germany notched up a record government budget surplus of 1.2 percent of GDP, Destatis said.
It was “a strong performance by an economy firing on all cylinders,” commented ING Diba bank economist Carsten Brzeski.
“The same fundamentals which have supported growth in 2016 and 2017 should still be in place in 2018,” he added.
Strong growth and bulging state coffers have stoked demands from politicians and unions to put some of the country's wealth to work, whether by offering voters tax cuts, boosting public spending and investment, or increasing wages.
Thursday's growth data come on the same day that Chancellor Angela Merkel's conservatives enter a final round of talks with the centre-left Social Democrats to explore renewing their left-right “grand coalition”.
And the figures follow on the heels of days of strikes by powerful metalworkers' union IG Metall, which is pushing for a big salary increase and the option of working a 28-hour week.