First-quarter GDP growth was 0.6%, faster than the October-to December 2016 figure of 0.4%.
Household and state spending were strong, while firms invested money in construction and equipment, said German statistics authority Destatis.
Foreign trade also helped, as exports increased faster than imports.
Germany has the largest economy in the eurozone and its performance is in marked contrast to that of other big countries, such as Italy and France.
However, its relative strength has prompted concern in Brussels.
In February, the European Commission said Germany's current account surplus - which measures the balance of goods, services and investments into and out of the country - was too big.
It said that cutting that surplus would help the whole of the eurozone.
Germany's economy grew strongly in the first three months of this year, driven by investment and consumption, official figures show.