Wall Street logged a strong showing Thursday with all three major indices rallying on the back of encouraging consumer data that soothed earlier fears of a potential downturn.

The Dow Jones Industrial Average rose 1.4 percent to 40,563.06, while the broad-based S&P 500 added 1.6 percent to 5,543.22.

The tech-focused Nasdaq Composite Index surged by 2.3 percent to 17,594.50.

This came after US retail sales rose 1.0 percent in July from June, exceeding expectations and reassuring investors about the health of the world's biggest economy.

"The retail sales numbers pushed back fears of a recession," said Peter Cardillo of Spartan Capital.

"It shows that the consumer is not hibernating," he added.

Jobless claims data also showed that initial claims fell in the week ending August 10, adding to signs that the labor market is weakening but not too rapidly.

Retail giant Walmart reported higher revenues Thursday too, on greater e-commerce and advertising sales, prompting a 6.6 percent rise in its shares.

The company's earnings are closely watched as a gauge of the broader health of US consumers, given its size and scale in the country.