The deaths came as pro-Russian protesters clashed with Ukrainian government supporters in the city.
Officials said some people were overwhelmed by smoke and others died after they jumped from the building.
Earlier President Oleksandr Turchynov said many separatists had been killed in a government offensive in Sloviansk.
Activists have seized scores of government buildings and detained observers in eastern Ukraine.
The fire broke out in Odessa’s Trade Unions House, the regional office of Ukraine’s interior ministry said. It did not give details of how the blaze started.
The exact sequence of events is still unclear, but reports suggest the separatists had barricaded themselves inside the building and both sides were throwing petrol bombs.
The interior ministry gave a toll of at least 31 dead, revising down an earlier tally of 38 killed.
Ukrainian Deputy Foreign Minister Danylo Lubkivsky said he regretted the loss of life but insisted Russia was behind the violence.
“The situation remains under control. But the security situation is threatened by Russian special agents,” he said.
“That’s why we are requesting and demanding Russian authorities to stop their efforts that can undermine regional security and stability.”
Meanwhile, Russia’s foreign ministry said Moscow was “outraged” by events in Odessa and denounced Kiev’s “irresponsibility”, AFP news agency reports.
Earlier, four people were killed in clashes between the pro-Russian and pro-Kiev protesters in the city – the first such eruption of violence in the south after weeks of mounting unrest in Ukraine’s east.
The death toll in Odessa is the highest since violence broke out between pro-EU protesters and police in the capital in February.
Meanwhile the latest reports from rebel-controlled Sloviansk in the east say intense gunfire has broken out in the centre of the city.
During the day government forces took over pro-Russian checkpoints outside the city.
Separatists shot down two Ukrainian army helicopters, killing a pilot and another serviceman.
T1OqU3abolgImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…