The closely watched ZEW index rose 16.6 points to reach a three-year high of 56.1 points, smashing expectations by economists polled by Dow Jones Newswires of an increase to 47.3 points.
"Positive growth figures for German gross domestic product (GDP) in the second quarter have improved financial experts' assessments of economic conditions," the ZEW said.
"Another rise in industrial orders and exports growing again is brightening Germany's economic prospects. As a result, business expectations for all sectors, in particular for exporters, have noticeably improved," it said.
Last Thursday, official data showed GDP growing 0.3 percent in the second quarter from the previous quarter, the first expansion in Europe's biggest economy since the first three months of 2008.
Figures the same day showed fellow European heavyweight France also emerging from recession, and on Monday data in Japan showed the world's second biggest economy after the United States growing for the first time in over a year.
Other figures have also given grounds for optimism, with exports – the backbone of the German economy – rising seven percent in June compared to the previous month and industrial orders jumping 4.5 percent.
Brightening prospects for Germany have also helped to boost Chancellor Angela Merkel's chances of securing a second term in general elections on September 27.
Jennifer McKeown at Capital Economics said the ZEW survey, which means that an increasing majority of investors expect conditions to improve in the next six months than expect them to worsen, is "another pretty encouraging sign."
"On the face of it, this suggests that the increase in economic activity in the second quarter might become a sustained recovery," McKeown said in a research note.
However, she cautioned that a sub-index showed investors still downbeat about current conditions and that it would be better to wait for more evidence of an upswing.
"There is no reason for euphoria," ZEW chairman Wolfgang Franz said. "The German economy is dependent on developments in the global economy and should therefore recover only gradually."
"The German economy is out of recession, but not out of the woods yet. The second quarter ended a record period of four consecutive quarters with negative growth," said ING economist Carsten Brzeski.
"In all the enthusiasm about the recent numbers and the near term outlook, there are still some impediments to a real recovery, the most pressing one being the worsening labour market."