The Colombo Consumer Price Index gained 0.3 points to 176.8 points in the month.
The inflation data came as the state hiked taxes on cigarettes and alcohol. The index however does not count alcohol or tobacco as it is against the 'Mathata thither' or 'full stop to intoxicants' strategy of the current administration.
The food and non-alcoholic beverages index gain 0.2 percent in July while non foods rose just 0.1 percent.
Sri Lanka is recovering from a balance of payments crisis and private credit growth has been weak.
In past crises, inflation had been muted or reversed as the country emerged from the crisis, with credit growth turning negative and a strengthening exchange rate.
But this time policy has been loosened aggressively, the exchange rate has been weaker and credit has generally been in positive territory, especially with heavy state borrowing.