Economists had forecast the CPI rising 0.2 percent in July and climbing 1.8 percent year-on-year.
Stripping out the volatile food and energy components, consumer prices gained 0.1 percent for the fourth straight month. The so-called core CPI rose 1.7 percent in the 12 months through July and has now increased by that margin for three consecutive months.
Despite the modest gain in consumer prices, which came on the heels of a drop in producer prices in July, many economists continue to share the Fed's conviction that transitory factors were holding back inflation.
Fed Chair Janet Yellen told lawmakers last month that "some special factors," including prices for mobile phone plans and prescription drugs, were partly responsible for the low inflation readings. Mobile phone prices continued to decline in July, falling 0.3 percent.
Prices of U.S. government debt initially rose on the inflation data, but pared gains after Russian Foreign Minster Sergei Lavrov said there was a Russian-Chinese plan to defuse tensions between the United States and North Korea.
The dollar .DXY was trading lower against a basket of currencies, while U.S. stocks rose.
The Fed has a 2 percent inflation target and tracks a measure that has been stuck at 1.5 percent since May.
Inflation remains tame despite a tightening labor market, a conundrum for the central bank as it contemplates tightening monetary policy further.
The Fed is expected to outline a program to start offloading its $4.2 trillion portfolio of Treasury bonds and mortgage-backed securities at its Sept. 19-20 policy meeting.
It is expected to raise interest rates in December, though such a move would depend on future inflation data. The Fed has raised borrowing costs twice this year.
"One-time factors that have slowed inflation will gradually dissipate," said Gus Faucher, chief economist at PNC Financial Services in Pittsburgh. "Stronger wage growth as businesses compete for scarce workers will also contribute to higher inflation in the second half of this year and in 2018."
Food prices rose 0.2 percent last month, driven by a surge in the cost of meat, fish, eggs, fruits and vegetables. Food prices were unchanged in June. The cost of food consumed at home increased 0.2 percent.
Consumers also paid more for prescription drugs, whose prices jumped 1.3 percent after increasing 1.0 percent in June. Prices for apparel rose 0.3 percent after four straight monthly declines. While gasoline prices were unchanged after tumbling 2.8 percent in June, electricity prices rose 0.4 percent.
Rental costs maintained their upward trend last month. Owners' equivalent rent of primary residence rose 0.3 percent after advancing by the same margin in June.
The cost of new motor vehicles fell 0.5 percent, the biggest drop since August 2009 and the sixth consecutive monthly decline, amid slumping demand.
Low inflation is a relief for many Americans who have seen their paychecks barely increase in recent years. In another report, the Labor Department said inflation-adjusted average hourly earnings increased 0.7 percent in the 12 months through July, slowing from June's 0.9 percent gain.
"The Fed may want inflation to pick up, but that would not be good news to households," said Joel Naroff, chief economist at Naroff Economic Advisors in Holland, Pennsylvania. "The only way spending power has increased at all is that inflation has remained below the Fed's target rate."
Reporting by Lucia Mutikani; Editing by Paul Simao
© Reuters News 2017