U.S. consumer confidence unexpectedly rose in July, but remained in the tight range of the past two years amid lingering worries about inflation and higher borrowing costs.

The Conference Board said on Tuesday that its consumer confidence index increased to 100.3 this month from a downwardly revised 97.8 in June. Economists polled by Reuters had forecast the index falling to 99.7 from the previously reported 100.4.

"Even though consumers remain relatively positive about the labor market, they still appear to be concerned about elevated prices and interest rates, and uncertainty about the future, things that may not improve until next year," said Dana Peterson, chief economist at the Conference Board.

Consumers' 12-month inflation expectations were steady at 5.4% in July. They peaked at 7.9% in 2022.

(Reporting by Lucia Mutikani; Editing by Chizu Nomiyama)