It means the rate remains well above the Bank of England's 2% target, and it brings to an end a three-month period during which the rate had been falling.
The unexpectedly high rate was boosted by strong rises in air fares, clothing and food. Fuel prices fell.
Air fares, which tend to rise during the summer holiday months, jumped 16% in August - their sharpest rise for the month on record.
Clothing and footwear prices rose at their fastest monthly rate for an August since 2001, although prices remain below their level of a year ago.
Summer sales discounts happened earlier in the year than usual, meaning that discounting had a relatively smaller impact on the August data than usual.
Food costs continued to rise, with bread, cereals and vegetables leading the way.
Wheat prices hit a 22-month high in August after rising more than 50% since the end of June.