The Consumer Price Index rose from 2.3% the previous month.
The main contributor to the uptick in prices was higher air fares, thanks to Easter falling later this year, the ONS said.
Rising prices for clothing, vehicle excise duty and electricity also contributed to the rise.
With the Brexit-hit pound pushing up import costs, prices are expected to continue rising. Last week’s inflation report from the Bank of England forecast inflation to reach 2.8% by the end of the year.
Maike Currie, investment director at Fidelity International, said: “The combination of rising prices and lacklustre wage growth is squeezing real incomes and making life more difficult for consumers.”