The UK inflation rate rose to 0.7% in the 12 months to March, up from 0.4% in February, pushed up by the increased cost of fuel, transport and clothes.
The figure from the Office for National Statistics (ONS) was slightly below economists' forecasts, with lower food prices offsetting other price rises.
Fuel prices in March showed their biggest annual increase since January 2020, the ONS said.
Inflation is forecast to rise further due to higher energy and oil prices.
The Bank of England has forecast that inflation could reach 1.9% by the end of 2021, with other experts saying it will exceed 2% before the end of year.
The March inflation figure would have been higher without a fall in food prices, the Office for National Statistics (ONS) said.
ONS deputy national statistician Jonathan Athow said: "The rate of inflation increased with petrol prices rising and clothes recovering from the falls seen in February.
"However, food prices fell back on the year, as prices of some staples were lower than at the start of the pandemic."
Inflation had unexpectedly eased in February, in part because of the biggest annual fall in clothing and footwear costs since 2009.
Discounting, which had been commonplace in February, eased somewhat in March, the ONS said, however it was still unseasonably high.
Pantheon's chief UK economist, Samuel Tombs, believes the Consumer Prices Index (CPI) will reach the Bank of England's 2% target rate as early as May.
At the last big fiscal event, Chancellor Rishi Sunak let it be known that what keeps him awake at night is the risk that interest rates rise, making the public finances unsustainable.
The Office for Budget Responsibility (OBR) has indicated a one percentage point rise in interest rates would add around £20bn to the cost of servicing the debt.
So with consumer price inflation now heading back to its official target of 2% - some say as soon as next month - how much sleep should the chancellor lose?
If you listen to those who spend their entire waking lives speculating about these things, interest rates swaps traders in the City, after looking at the inflation figures they're evenly split between those who think we'll have a rate rise by the end of 2022 and those who think it will take longer. But they're only pricing in a quarter of a percentage point, even then.
By which time, if the OBR's forecasts are right, the budget deficit will be coming down, slowing the rise in debt as the economy grows.
Right now it amounts to a calming message to Rishi: relax, Chancellor, and go back to sleep.
"Looking ahead, CPI inflation looks set to jump to about 1.7% in April, driven primarily by a large semi-annual increase in electricity and natural gas prices, as well as the anniversary of the collapse in oil prices at the start of the pandemic," he said.
"April's data also will be collected after shops reopened and hospitality businesses resumed outdoor service, so the inflation rates for clothing and food service activities probably will both rise."
And Paul Craig, at Quilter Investors, said that with the UK economy opening from lockdown, inflation had reached a turning point.
"Price growth is now on an upward trajectory, and should remain so for some time to come," he warned. "From here, inflation may tick markedly higher if the steady drip of consumer spending morphs into a waterfall as lockdown restrictions are lifted and households spend some of their accumulated pandemic savings."
Inflation fell in the early months of lockdown last year, with petrol hitting as low as 106.2p per litre in May. The ONS said on Tuesday that pump prices hit 123.7p a litre in March.
Domestic energy bills are also rising. Regulator Ofgem's price cap on household bills rose from the beginning of this month.
Laith Khalaf, financial analyst at AJ Bell, said: "The big question is whether the economic recovery, combined with fiscal and monetary stimulus, will start to foster a more sustained, inflationary trend that has the potential to get out of hand."
But he added: "This risk isn't likely to come home to roost anytime soon, with unemployment expected to rise later this year, thereby acting as a drag on rising wages."
Meanwhile, the Retail Price Index (RPI), used to calculate train ticket price rises and student loan interest, rose from 1.4% to 1.5%.