Economists had expected the CPI measure to remain at zero, or even fall into negative territory.
The Office for National Statistics said a smaller fall in clothing prices compared with a year ago was the main contributor to the rise in inflation.
It added: “Falling prices for food and non-alcoholic beverages partially offset the rise.”
Peter Cameron, associate fund manager at EdenTree Investment Management, said: “This morning’s inflation figures are higher than expected but could easily fall back next month.
“Brent crude has dropped below $50 a barrel and China, the world’s largest exporter, is potentially now unleashing a new wave of deflationary forces around the world through the devaluation of its currency.”
He added: “In this context it’s unclear why the Bank of England would consider raising rates anytime soon, even after today’s surprise figures.”