Analysts, who had been expecting an increase of only 0.3 per cent in July, said the result was a strong start to growth in the third quarter. Industry experts noted that online sales likely received a lift from Amazon.com's Prime Day promotion.
Economists had forecast retail sales increasing 0.4 per cent in July.
Excluding auto and gasoline, retail sales still rose a healthy 0.5% in July.
Retail sales alone increased 4.3% from a year ago, with the largest gain again coming from non-store retailers - primarily by e-commerce and catalog businesses with sales up 11.5% from July 2016.
A mysterious decline in spending at the end of the second quarter, meanwhile, vanished after fresh government revisions based on newly incorporated sales data.
Sales also rose 1.2% at auto dealers, 1.2% at home and garden centers and even 1% at department stores that have been losing ground to Internet rivals.More news: Trump Will Return To New York Next Week 'For More Meetings'
Retail sales have climbed 4.2% in the past 12 months, close to the five-year average.
Nonstore Retailers were up 11.5% from July 2016, while Building Materials and Garden Equipment and Supplies Dealers were up 8.3% from previous year.
Excluding sales of autos and parts, sales rose by 0.5% on the month to hit $378.8bn (consensus: 0.4%).
"With consumer confidence at firm levels, employment continuing to rise and wages showing some evidence of picking up we remain optimistic on the prospects for consumer spending", said James Knightley chief worldwide economist at ING. Prices could decline further as a separate report from the Labor Department on Tuesday showed the cost of imported motor vehicles fell in July for the second consecutive month. Americans increased spending last month on most goods except for clothes and gasoline. There were also strong gains in sales at furniture stores, hardware stores and restaurants.
That helped boost sales of so-called nonstore retailers by 1.3% last month, the largest increase since December.
Electronics and appliances stores decreased 0.5 percent seasonally adjusted from June and decreased 1.4 percent unadjusted year-over-year.