It is the sharpest month-on-month increase in the rate of inflation for two years.
Inflation was higher than expected for the month, after economists had predicted a reading of 2.2%.
The significant rebound, which could increase pressure on the Bank of England to delay cuts to interest rates, comes after CPI inflation had dropped to a three-year-low in September.
Read More:
The ONS said an increase in household energy costs particularly contributed to the latest rise in inflation.
In October, average household energy bills increased by £149 a year after regulator Ofgem raised the cap from £1,568 for a typical dual fuel household in England, Scotland and Wales to £1,717. This represented a roughly 10% rise.
ONS chief economist Grant Fitzner said: “Inflation rose this month as the increase in the energy price cap meant higher costs for gas and electricity compared with a fall at the same time last year.
“These were partially offset by falls in recreation and culture, including live music and theatre ticket price.
“The cost of raw materials for businesses continued to fall, once again driven by lower crude oil price.”
The data also showed that a rise in airfares also helped push inflation higher, with fares rising 6.6% in October compared with the previous month.
Transport inflation was however lower as a whole, as this was offset by a drop in motor fuel prices.
UK inflation has now returned back above the 2% target rate for inflation set by the Bank of England and the Government.
This could put some pressure on hopes that policymakers at the central bank will continue to cut interest rates, after reducing the base rate to 4.75% earlier this month.
High interest rates have been used by the Bank of England to put pressure on spending demand from consumer and businesses and help bring down inflation, after it soared as high as 11.1% two years ago.
Rate-setters on the Bank’s monetary policy committee (MPC) have since voted on two occasions to reduce rates after bringing inflation down to target levels earlier this year.
Monica George Michail, associate economist at NIESR (National Institute of Economic and Social Research) said: “We forecast annual headline inflation to rise further towards the end of the year as base effects drop out.
“While we think the Bank of England will continue to cut rates in 2025, the pace of rate cuts is expected to be slower than previously anticipated, and rates may stay elevated for longer.”
Treasury Chief Secretary Darren Jones said: “We know that families across Britain are still struggling with the cost of living.
“That is why the Budget last month focused on fixing the foundation of our economy so we can deliver change.
“But we know there is more to do.
“That is why the Government is focused on economic growth and investment so we can make every part of the country better off.”