Live updates: follow the latest news on Russia-Ukraine
The offer in principle by Chancellor Olaf Scholz in a call with President Volodymyr Zelenskyy went further than more cautious public statements by the US and Britain, also named by Ukraine as potential security guarantors.
The tentative peace efforts came as Russia appeared to back down from an energy stand-off on Thursday, with President Vladimir Putin signing a decree that indicated oil and gas imports could still be paid for in euros.
Mr Scholz and his Italian counterpart Mario Draghi said they had received assurances from Mr Putin that an earlier demand to raise the money in roubles could be met by transferring dollars or euros into a Russian bank account.
The initial demand had been regarded by western powers as an attempt to work around sanctions imposed on Russia over the five-week-old war in Ukraine.
Diplomats reported some progress in peace talks this week in Turkey, at which Ukraine offered to drop its membership bid for Nato, a Russian demand, in exchange for guarantees from named countries to defend it from aggression.
Ukraine sees such assurances as mirroring Nato’s Article 5 mutual defence clause and named the UK, US, France, China, Germany, Turkey, Canada, Poland and Israel among potential guarantors.
Mr Zelenskyy has asked Mr Scholz directly for Germany’s involvement and the chancellor responded by “signalling a general willingness” to take part in such a treaty, his spokesman Steffen Hebestreit said.
“We would have to look at exactly how it’s formulated but Germany, like many other countries, is certainly ready to act as a security guarantor,” he said.
He said further details, such as whether any assistance from guarantors would be military or economic, would have to be thrashed out in negotiations between Russia and Ukraine.
Ukraine’s proposal is that the guarantors must hold three days of consultations after any attack on the country, after which they would be legally obliged to provide military assistance, for example by supplying weapons.
Nato has been unwilling to intervene directly in the current conflict for fear that engaging Russian troops face-to-face would lead to a wider East-West war.
In Britain, Deputy Prime Minister Dominic Raab said the government would consider any request from Mr Zelenskyy but played down the prospect of matching Article 5 in a treaty.
“It would depend on what precisely is involved,” Mr Raab told the BBC. “We are not going to, I think, replicate unilaterally the Nato commitments that apply to Nato members.”
In the US, White House spokeswoman Kate Bedingfield said Washington was in constant discussion with Ukraine about ways to ensure its security but declined to comment on whether American troops could offer any guarantees.
Ukraine said Italy had expressed interest in being part of such a treaty after what it described as preliminary discussions with guarantor countries at the level of political advisers.
The Russian invasion has shown that “the old formats of European or even global security do not work”, said Mykhailo Podolyak, an adviser in Mr Zelenskyy’s office.
Russia, for its part, said Ukraine’s proposed neutrality would meet its demands but said issues including the future of annexed Crimea and the disputed Donbas region remained unresolved.
Western powers reacted sceptically to Moscow’s announcement this week that it was scaling back military operations near Kyiv, amid uncertainty over whether Russia was really de-escalating or merely regrouping its forces.
But western leaders came away from Mr Putin confident that gas contracts could still be paid in euros after Russia's initial request for roubles threatened to exacerbate Europe's energy crisis.
Kremlin spokesman Dmitry Peskov also played down the scope of the changes, saying that "de facto, for those who receive Russian gas, who pay for the deliveries, there is in fact no change".