Economists polled by Reuters expected inflation for July to be 2.3%.
Official data showed that the inflation rate in Britain rose more than the rate targeted by the Bank of England in June, reaching 2.5%, compared to 2.1% in May.
The Bank predicted at the time that the inflation rate would exceed 3% with the end of the general isolation measures.