The M-55S tanks are the latest pieces of former Warsaw Pact equipment to be sent to Ukraine during its seven-month struggle against the Russian invasion.
An upgraded version of decades-old Soviet T-55s inherited from the former Yugoslavia, the tanks are designed to destroy enemy vehicles on the battlefield.
Slovenian Prime Minister Robert Golob said the tanks were being donated "in the spirit of solidarity with the Ukrainian people".
An arrangement was made with German Chancellor Olaf Scholz, during a telephone call with Mr Golob on Monday, for Slovenia to be compensated with German equipment.
Germany will refill Slovenia's stocks with 40 military transport vehicles, including 35 heavy hook loaders and five water tankers, Mr Golob's office said.
Western countries such as Germany have often preferred this indirect route to sending their own tanks to Ukraine, although Kyiv rejects the argument that it could not handle more modern equipment.
The Defence Ministry in Berlin separately announced on Monday that four more German howitzers and the necessary ammunition would be sent to Ukraine.
It takes the total of German-made howitzers sent to Ukraine to 22, including eight that were owned and forwarded by the Dutch military.
Ukraine conflict latest - in pictures
However, debate continues to rage in Berlin over whether the Leopard tank, a 1970s model of West German design, should be sent to Ukraine as the government in Kyiv has requested.
Opposition MPs, and some within Mr Scholz's coalition, say Germany should send western tanks to add to Ukraine's momentum after it made gains during a recent counter-offensive.
Ukrainian President Volodymyr Zelenskyy made this argument in his nightly address, in which he said: "The pace of providing aid to Ukraine should correspond to the pace of our movement."
But Mr Scholz has remained cautious, and Joe Weingarten, an MP in his Social Democratic Party, said on Tuesday that he opposed sending Leopards because they could fall into Russian hands.
Meanwhile, UK Prime Minister Liz Truss announced that Britain would send at least as much military aid to Ukraine next year as it has in 2022, a sum of about £2.3 billion ($2.6bn).
The nature of the support will be decided in response to Ukrainian needs but is likely to include more multiple-launch rocket systems, Downing Street said.
William Hague, a former foreign secretary and Conservative Party leader, said Britain too should send main battle tanks to help Ukraine to a "speedier victory".
"That is also the best way to push Putin into a face-saving retreat, with the least Ukrainian territory still under his control," he wrote in The Times.