The widely-watched GfK economic institute index rose to 2.9 points for July from a revised 2.6 points in June. Analysts had forecast July would come in at 2.5 points, the same reading on the report since March.
"Despite the economic crisis, consumers are in the mood to buy," a GfK statement said.
However, "the real test is yet to come, given the likelihood of rising unemployment in the months ahead," the institute added.
ING Bank economist Carsten Brzeski commented that "the often rebuked German consumer seem to be more crisis-proof than widely believed."
GfK's survey of around 2,000 consumers measures overall sentiment as well as personal income expectations, views of the economy in general and the propensity to make major purchases.
Hopes for a stabilisation of the economic downturn have gained ground among consumers, it said. A separate Ifo group study released on Monday showed German companies were also getting over their recession blues and beginning to see a stabilisation of business activity.
Ifo's index for June rose for a third straight month to reach 85.9 points, the highest reading since November when Berlin unveiled the first of two huge stimulus packages.
"Following the recent growing number of signs that the economic downturn may be coming to an end, consumer hopes of economic stabilisation are intensifying and accordingly, economic expectations are increasing moderately," GfK said.
But its main index reading remained at a low level and questions remained as to whether German consumers were really poised for a steady rise in confidence in light of the uncertain unemployment outlook.
Germany has managed to keep job losses to a minimum through the use of government-subsidised shorter working hours but companies are near the point where they might begin to lay off workers, something which often occurs towards the end of economic downturns.
Germany's economy contracted by a record 3.8 percent in the first three months of 2009 and is forecast to shrink by 6.0 percent this year, which would be its biggest slump since 1945. Private consumption was the only component that contributed significantly to economic activity in the first quarter.
A breakdown of the consumer survey results showed expectations concerning personal revenue jumping six points to minus 3.3 points, owing to inflation which is now at zero and an increase in pension payments on July 1, GfK said. Consumer sentiment regarding the economy in general gained 5.7 points but "the indicator is still far too low to warrant talk of an incipient recovery from the perspective of consumers," GfK said.
The propensity to make major purchases was two points higher, in part because some prices had dropped, in particular for automobiles thanks to a state "cash-for-clunkers" scheme that subsidises the purchase of new cars.
Alexander Koch at UniCredit noted however that "the number of new applications for the car scrapping premium has decelerated drastically of late, signalling a setback in domestic new car purchases ahead."