Prices are continuing to rise at their fastest rate for more than 40 years, driven by higher petrol and food costs.
UK inflation, the rate at which prices rise, jumped to 9.4% in the 12 months to June from 9.1% in May, the Office for National Statistics (ONS) said.
Unions have been calling for pay rises to help workers cope as the rising cost of living eats into household budgets.
The Bank of England has warned inflation will reach 11% this year.
Inflation is the pace at which prices are rising. For example, if a bottle of milk costs £1 and that rises by 5p compared with a year earlier, then milk inflation is 5%.
Fuel prices have soared in recent months, driven by the war in Ukraine and moves by the European Union to reduce its dependence on Russian oil.
It has led to the average family car costing more than £100 to fill up, according to the RAC. However, the AA said this week that lower wholesale costs of fuel were leading to cheaper prices at the pumps, though they still remain much higher than before the Ukraine war.
Surging petrol prices
Grant Fitzner, chief economist at the ONS, said the increase in inflation in June was driven "by rising fuel and food prices".
Average petrol prices stood at 184p per litre in June, the ONS said, the highest since records began in 1990 and up from 129.7p a year earlier. The monthly rise was also the largest on record.
The average price of diesel in June was 192.4 pence per litre, again a record high, the ONS said.
Elsewhere, food prices have been climbing, with costs increasing at the fastest rate since March 2009.
Milk, cheese and eggs saw the biggest rises in June, latest figures show, with the prices of vegetables, meat and ready meals also increasing.
Research firm Kantar has predicted supermarket bills are set to rise by an average of £454 this year.
Prices charged in restaurants and for accommodation have also increased, climbing by 8.6% in the year to June, the ONS said.
The agency said a survey asking businesses how inflation and higher running costs were affecting them revealed that over half had absorbed the costs, while just over a third said they had been forced to pass them on to customers.
More rates rises ahead
Chancellor Nadhim Zahawi said the government was working with the Bank of England to "bear down on inflation".
"Countries around the world are battling higher prices and I know how difficult that is for people right here in the UK," he said.
The Bank of England could raise rates by as much as 0.5% at its next rates meeting in August in a bid to stem rising prices, its boss has said.
One way to try to control how fast prices are rising is to put up interest rates. The aim is to increase the cost of borrowing so that people borrow and spend less, and save more.
Andrew Bailey, the Bank's governor, said that a rise - from 1.25% to 1.75% - will be one of the options on the table.
However, some economists doubt higher rates will fully stop today's inflation, which is largely driven by global factors such as the war in Ukraine and the impact of Covid on supply chains.