Technology and growth stocks including Apple Inc were among the biggest boosts to the Nasdaq.
Energy led S&P 500 sector gains following a rise in crude oil prices. The S&P 500 energy index was last up more than 3%.
Investors across markets were also trying to position ahead of Friday's U.S. monthly jobs report.
Tony Rodriguez, head of fixed income strategy at Nuveen, said the Treasury market's real focus will be Friday's labor report and the potential that an unexpectedly much higher or lower number of job gains could move the market.
"I think it would have to be closer to 1.2 million (in jobs gains) to have the market really feel like growth is accelerating at a pace that's a little above what people expected coming into this," Rodriguez said.
Stock indexes in Europe were boosted by upbeat earnings and business activity.
Data showing euro zone business activity quickened last month, while the services industry returned to growth.
The Dow Jones Industrial Average rose 157.65 points, or 0.46%, to 34,290.68, the S&P 500 gained 21.78 points, or 0.52%, to 4,186.44 and the Nasdaq Composite added 82.54 points, or 0.61%, to 13,716.04.
The pan-European STOXX 600 index rose 1.82% and MSCI's gauge of stocks across the globe gained 0.57%.
India's Nifty 50 was 0.8% higher, its best day in a week, as the central bank rolled out a series of measures to support the coronavirus-ravaged economy, including allowing certain small borrowers more time to repay loans.
The dollar was near flat after moving off more than two-week highs followed some softer-than-expected U.S. economic data.
U.S. private payrolls rose by the most in seven months in April, ADP data showed on Wednesday, as companies boosted production to meet a surge in demand amid massive government spending and rising COVID-19 vaccinations. But the 742,000 private jobs created fell short of the 800,000 jobs expected by economists in a Reuters poll.
A separate report showed services industry activity eased in April from a record level in March, likely due to shortages of inputs amid a burst of demand, data from the Institute for Supply Management showed.
The dollar index rose 0.001%, with the euro down 0.09% to $1.2002.
In the U.S. Treasury market, yields backpedaled from earlier highs. An announcement of second quarter auction sizes and economic data did not move the market out of its holding pattern.
The benchmark 10-year yield, which hit a session high of 1.626%, was last up less than a basis point at 1.5996%, holding below a 14-month high of 1.776% reached on March 30.
Oil prices rose for a third day. Brent crude was up 59 cents at $69.47 a barrel, while U.S. West Texas Intermediate (WTI) crude rose 47 cents to $66.16.
Spot gold added 0.2% to $1,782.76 an ounce. U.S. gold futures gained 0.29% to $1,780.90 an ounce.
(Additional reporting by Tom Arnold in London, Karen Pierog in Chicago, Shreyashi Sanyal and Sruthi Shankar in Bengaluru, and John McCrank; Editing by Kim Coghill, Will Dunham and Mark Heinrich)
By Caroline Valetkevitch