The Ifo economic institute's closely watched business climate index climbed to 106.2 points this month from 105.9 in June. Analysts polled by Dow Jones Newswires had expected a more modest rise to 106.0 points.
"Assessments of the current business situation are more positive than last month," the think tank's economist Kai Carstensen said in a statement. "Although the six-month business outlook weakened slightly, firms remain cautiously optimistic with regard to their future business outlook."
Ifo calculates its headline index on the basis of companies' assessments of their current business and the outlook for the next six months.
The sub-index measuring current business increased to 110.1 points in July from 109.4 points in June. But the outlook sub-index fell slightly to 102.4 from 102.5 points.
Despite concern that a tentative eurozone recovery could be derailed again on its way out of recession, businesses in both manufacturing and retailing expressed satisfaction with the current climate.
Wholesalers were also upbeat but were more sceptical than those in other sectors about their outlook. The business climate indicator for construction, however, fell again despite strong turnover for the industry in Germany.
Analyst Annalisa Piazza at Newedge Strategy said the indicator showed progress in the right direction, albeit at a slower pace than in June.
"All in all, the modest increase in the Ifo index points to a slight increase in German GDP" at the start of the third quarter, she said.
Jennifer McKeown, senior European economist at Capital Economics, agreed that the Ifo signalled a tepid economic rebound.
"Recent weak hard data on trade and industrial production were a warning not to get too carried away about the speed of the recovery," she said. "In all, while prospects for Germany are clearly better than those elsewhere in the eurozone, we still see GDP rising modestly at best this year and next."
Economist Christian Schulz at Berenberg Bank said slack demand in key markets for exports - a crucial component of the German economy - prevented a higher score this month, despite brisk domestic business.
"Germany may have to rely on domestic demand for growth this year as China and other emerging markets slow while the eurozone is only stabilising so far," he said.
"German consumption may also explain why manufacturers' confidence in the eurozone periphery is currently catching up fast with Germany and in some cases even surpassing it."
Thilo Heidrich of Germany's Postbank said the sunny outlook could quickly cloud over if eurozone partners take another turn for the worse.
"The slightly less optimistic outlook shows that companies continue to see risks. In our view, they lurk in particular in the political developments of crisis countries," he said.
"While it appears that the reshuffled government in Portugal will survive, the slush fund scandal in Spain and the Berlusconi trial in Italy continue to spell trouble. However we do not expect these potential sources of instability to seriously threaten the nascent economic recovery."