Stocks were near flat on Tuesday as ongoing concern about a stalemate in the U.S. debt talks offset healthy earnings from corporations.

Light volume indicated many investors were choosing to stay on the sidelines.

A failure to raise the U.S. debt limit by an Aug. 2 deadline could roil markets and hurt the economy if the United States puts off paying bills.

U.S. President Barack Obama took to the airwaves Monday night to rally support for a debt plan proposed by Democrats, and warned that failure to make a deal would severely hurt the nation.

"This is a political issue. Both of these sides feel they have a great deal to lose, but we all feel as though there's going to be a deal. Look at the market, the S&P is down nothing. There's going to be a deal," said Mike Shea, a managing partner and trader at Direct Access Partners LLC in New York.

Technology stocks led the broader market's gains, with the SPDR Technology Select Sector Index exchange-traded fund up 0.7 percent.

Shares of China's top search engine Baidu Inc jumped 5.2 percent to $164.66, a day after it forecast revenue well ahead of Wall Street expectations.

Mostly stronger-than-expected profits so far for the second quarter have provided a positive for the market despite the debt debate.

The Dow Jones industrial average was down 53.51 points, or 0.42 percent, at 12,539.29. The Standard & Poor's 500-stock index  was down 1.14 points, or 0.09 percent, at 1,336.29. The Nasdaq Composite Index was up 4.84 points, or 0.17 percent, at 2,847.64.

Just 4.55 billion shares had changed hands in composite trading, another lower-than-average day of activity.

Weighing on the Dow were shares of 3M Co . 3M, whose products range from Post-It Notes to specialty films for computers and televisions, dropped 5.3 percent to $90.02, hurt by softness in some divisions even though its results met estimates.

Among other decliners, Netflix Inc slid 6.5 percent to $263.17, a day after the movie rental company warned its red-hot subscriber growth would cool in the third quarter.

(Additional reporting by Ashley Lau and Ryan Vlastelica, Editing by Chizu Nomiyama)