The industry has lagged the broader market this year, but surged after network communication company Adtran reported earnings that were double what Wall Street analysts expected. That boosted optimism that businesses will increase spending on technology equipment.
The Dow and S&P 500 both closed at all-time highs. Technology stocks rose 1.8 percent, the most of the 10 industry groups in the S&P. That's a big change from tech's weak performance this year. The group is up just 4.7 percent, trailing the S&P's gain of 11.3 percent.
The stock market is reversing course from last week, when investors' confidence fell because of an unexpectedly poor report on the U.S. job market and other signs that the economy slowed in March.
The Dow Jones industrial average jumped 128.78 points, or 0.9 percent, to 14,802.24. It was the third straight gain for the blue-chip index and its biggest one-day rise in a month. The Dow surged in the first three months of the year and is still up 13 percent in 2013.
The Nasdaq composite, which is heavily weighted with technology stocks, had the biggest percentage gain of the three main indexes Wednesday, rising 59.39 points, or 1.8 percent, to 3,297.25 The S&P rose 19.12 points, or 1.2 percent, to 1,587.73.
Investors are seeing positive news in the minutes from the Federal Reserve's latest meeting, which were released Wednesday. The minutes revealed that policy makers are becoming more confident that the U.S. economy can grow without the help of the bank's stimulus program, said Brian Gendreau, a market strategist at Cetera Financial Group.
Many Fed members indicated they want to slow and eventually end the central bank's bond-buying program before the end of the year, as long as the job market and economy show sustained improvement. The $85 billion in monthly bond purchases has kept interest rates extremely low, with the goal of encouraging borrowing and spending.
"The idea that the Fed thinks that we are closer to the restoration of normality might be positive for the market," said Gendreau.
Among stocks making big moves, Facebook rose 98 cents, or 3.7 percent, to $27.57 after General Motors said it would start running ads on the social network site. Adtran rose $2.75, or 14 percent, to $22.46, and JDS Uniphase rose 64 cents, or 4.8 percent, to $13.98.
Hospital stocks fell heavily after Deutsche Bank lowered its recommendation on the companies because their prices have risen so much that they no longer offer good value. Private hospitals have surged over the past year in anticipation that health care spending will increase following the introduction of Obama's health care plan.
Bond yields fell as investors moved money out of safe haven U.S. government debt and into riskier assets. The yield on the 10-year Treasury note rose to 1.81 percent from 1.75 percent late Tuesday.