The Office for National Statistics (ONS) said Consumer Prices Index (CPI) inflation jumped from 5.1% in November to 5.4% in December - the highest since March 1992, when it stood at 7.1%.
Most economists had expected inflation of 5.2% in December.
The ONS said inflation was pushed higher by food and non-alcoholic drinks prices last month, with costs also rising for restaurants and hotels, furniture and household goods, as well as clothing and footwear.
Household finances are being squeezed across the board as gas and electricity tariffs have also seen staggering rises and supply chain problems are pushing up costs across the economy.
The Bank of England has forecast inflation to hit 6% in April.
Policymakers raised interest rates last month, from 0.1% to 0.25%, to try to cool rampant inflation, and many experts expect another rise possibly as soon as early next month.
Grant Fitzner, chief economist at the ONS, said: "The inflation rate rose again at the end of the year and has not been higher for almost 30 years.
"Food prices again grew strongly while increases in furniture and clothing also pushed up annual inflation.
"These large rises were slightly offset by petrol prices, which, despite being at record levels were stable this month, but rose this time last year."
The figures come amid mounting pressure on the Government to help with eye-watering rises in gas and electricity bills, with fears that many vulnerable people are choosing between heating their homes and buying food.
Chancellor Rishi Sunak said: "I understand the pressures people are facing with the cost of living and we will continue to listen to people's concerns, as we have done throughout the pandemic."
The ONS figures also showed that the Retail Prices Index (RPI) measure of inflation soared to its highest level since March 1991- hitting 7.5% last month, up from 7.1% in November.
It said food and drink prices lifted by 4.2% year on year in December, which is the biggest rise since September 2013.
Clothes shops also put up prices by an average 4.2%.
But the biggest hit to consumer pockets continues to be the rises in energy bills after an October increase to the price cap, with experts warning over a leap of more than 50% in these costs when the next revision is due in April.
Meanwhile, motorists have also faced painful fuel price rises, and the ONS said average petrol prices remained at a record high of 145.8 pence a litre last month, compared with 114.1 pence a litre a year earlier.
The figures showed that CPIH, which includes owner-occupiers' housing costs and is the ONS's preferred measure of inflation, was 4.8% in December compared with 4.6% in November and the highest since September 2008.
Samuel Tombs, at Pantheon Macroeconomics, said December's inflation figures leave the Bank of England with "little choice but to hike rates again in February".
He said CPI is likely to peak "slightly above" 6% in April.
"Nonetheless, we continue to expect CPI inflation to fall back swiftly after April and ultimately to undershoot the (Bank's) 2% target in 2023," he added.