Corporate America is stuffing a lot of cash under the mattress.

In fact, if they all teamed up, they could buy Apple (AAPL), Facebook (FB) and Warren Buffett's Berkshire Hathaway (BRKA), and still have leftover Benjamins. Put another way: Corporate America has more cash than the economies of Belgium and Sweden combined.

S&P 500 companies, excluding financial companies, collectively had $1.43 trillion in cash reserves sitting on the sidelines in the second quarter (April to June) of this year, according to FactSet.

That's the second highest level in 10 years, and just a tad lower than the highest -- $1.45 trillion -- set in the fourth quarter last year.

Tech companies especially have much more cash than they did during the dot-com bubble era. Tech leads all sectors in its cash holdings by a long mile.

Some cash numbers are remarkable. Microsoft (MSFT) has $96 billion in cash, Google (GOOG) holds $70 billion and Cisco (CSCO) has $60 billion.

Related: American cities grow the most sine the Great Recession

The good news is that it reflects very healthy balance sheets of companies like Google and Microsoft and means they can weather any downturn in the economy.

The bad news is that it shows a reluctance to spend by corporate executives, which signals pessimism and that they aren't seeing enough growth opportunities to invest in.

Such hoarding hurts the economy -- when companies spend, it usually helps generate growth.

Exxon Mobil (XOM) cut its spending by $1.4 billion in the second quarter while Chevron (CVX) ( -$1.3 billion) and ConocoPhillips (COP) ( -$1.8 billion) also spent far less compared to a year ago. Exxon has $4.3 billion cash, Chevron has $12 billion and ConocoPhillips has $3.8 billion.

Overall, spending by S&P 500 companies -- measured by capital expenditures -- fell 5.6% compared to same quarter a year ago. Energy spending was down 24% over the year too.

"That's one thing that's driving cash up," says Andrew Birstingl, a research analyst for FactSet.

The outlook looks a little better going forward. Analysts estimate companies to start spending a little heading into next year.