WASHINGTON — More than half of the 50 states expect to end their budget years with cash surpluses as a recovery in the economy buoys tax collections, a sign of easing pressure in statehouses across the country.

Twenty-nine state governments, including New Jersey, Indiana and Arizona, anticipate ending their fiscal years with more money on hand than forecast when they put together their annual budgets, according to a survey released Thursday by the  National Conference of State Legislatures. It marks the first time since the onset of the 2007 recession that so many states will have unspent funds.

“State fiscal conditions continue to improve at a slow and steady pace,” the legislatures group said in the report. “To date, collections have met or exceeded expectations in most states. Officials expressed cautious optimism about the fiscal situation, reflecting the slow, but steady, improvement.”

The improving financial outlook lessens the need for state officials to make the spending cuts that have exerted a drag on the economy since it emerged almost three years ago from the worst recession since the Great Depression. States have closed more than $500 billion of budget deficits over the last four years by raising taxes, cutting jobs and curbing spending.

Tax collections have risen for the last two years, pushing them back above the peak hit before the recession, according to the Albany, N.Y.-based Rockefeller Institute of Government.

The gains also mark a positive shift for local governments whose own budget struggles have been exaggerated by cutbacks in state aid, said Alan Schankel, a managing director who tracks the municipal bond market at Janney Montgomery Scott in Philadelphia. As states recover, he said, they may send funds back to cities and counties.

Speculation about defaults in the $3.7 trillion municipal bond market has centered on local governments as cities including Harrisburg, Pennsylvania, Central Falls, R.I., and Stockton, Calif., sought or considered bankruptcy.

“It’s a positive thing for bondholders,” Schankel said. “It’s going to get some pressure off the local governments.”

The influx of funds left fewer states making emergency changes to close mid-year budget deficits and cut the scale of the shortfalls predicted for the 2013 fiscal year, according to the survey. Just 16 states, and Washington, D.C., reported facing combined deficits of $16.2 billion for 2013, with half of that coming from California and New York.

Alaska is projecting the biggest budget surplus for this year, $1.9 billion, as high oil prices benefit the petroleum- rich state. Indiana’s $1.79 billion of unspent funds triggered a taxpayer refund and put more money aside for pensions. Others with extra funds include South Carolina, Tennessee and Rhode Island, a state where fiscal turmoil has left the capital of Providence working to avoid bankruptcy.

Most states plan to use the money to rebuild reserve funds that were drawn down in recent years or spend it in the next fiscal year, according to the survey.

“Throughout the Great Recession, spending estimates often proved to be too low and revenue estimates too high, resulting in substantial state budget gaps,” the survey reported. “The fiscal environment, however, is beginning to stabilize.”

The legislatures group said that states could still suffer setbacks from federal budget cuts or a slowdown in the world’s economy.

“A degree of uncertainty still lingers over state budgets,” the group wrote in the survey. “Concerns about unemployment levels, potential federal deficit reduction actions, spending pressures and global economic events, are contributing to a cautious state budget outlook.”