The cost of a healthy diet is rising with prices of vegetables and mineral water on the up, official data shows.
Inflation figures revealed that while the cost of soft drinks and juices also increased, the prices of sugar, chocolate and confectionery dipped.
The month-on-month rise of 1% in food and non-alcoholic drink prices was a record rise for June to July, the Office for National Statistics said.
However, food generally accounts for just 12% of household spending.
UK inflation eased to 3.1% in July from 3.2% in June, the third month in a row that prices have risen more slowly.
The slowdown was due in part to clothing and footwear costs dropping, as well as cheaper furniture and household goods compared with June.
But as well as rising transport costs, food was a key factor in countering this drop.
The change in the year-on-year rate was dominated by vegetables, which are rising in price now, but were falling in price a year ago.
"There were smaller upward effects from meat, fruit and mineral waters, soft drinks and juices," the Office for National Statistics (ONS) said.
"These were partially offset by a small downward effect from sugar, jam, syrups, chocolate and confectionery."
Consumers' spending power has been squeezed because prices are rising faster than wages.
Prices of food staples, such as wheat, are rising.
Linda Yueh, a fellow in economics at Oxford University, said that some food had risen in price by 50% in recent times, owing to issues such as adverse weather conditions in places such as Russia.
Demand for food from Asia is also increasing, which is pushing up prices.
But with food accounting for about 12% of household spending in the UK, it was important not to overstate the effect of food prices, she said.
"Even if prices go up, it is not going to have a big, wide, aggregate effect. What really matters is that our economy is going to grow pretty slowly in the next couple of years," she said.