After a devastating crash earlier this year, the stock market made a stunning recovery in the months that followed.

However, the last few weeks have been rough on the market. The S&P 500, the Dow Jones Industrial Average, and the Nasdaq have all slid into correction territory, each dropping by roughly 10% since early September.

While nobody knows for certain whether a bear market is around the corner or not, it's wise to prepare for a market crash anyway. And there's one investment that will give your savings the best shot at recovering from even the worst market downturn: S&P 500 index funds.

Man sitting behind computer with his head in his hands

Image source: Getty Images.

S&P 500 index funds boast two major advantages: They provide instant diversification, and they're extremely likely to bounce back from market downturns. Both of these perks can play in your favor if the market continues its downhill slide.

1. Instant diversification

When you invest in an S&P 500 index fund, you're actually investing in 500 of the country's largest companies at once. These organizations have a proven track record of success, making them more likely to survive tough economic times.

In addition, spreading your money across hundreds of different stocks can limit your risk substantially if the market continues to fall. Even if a few companies within the S&P 500 take a nosedive, it won't cause your entire portfolio to plummet.

Of course, the S&P 500 itself could take a turn for the worse, and the index has already experienced a decline over the last few weeks. However, no matter what the market does, S&P 500 index funds are among the investments most likely to recover from a crash.

2. Almost guaranteed recovery

Nothing is ever guaranteed when it comes to the stock market, but S&P 500 index funds are about as close as you can get to guaranteed recovery after a market crash.

As their name implies, S&P 500 index funds track the S&P 500 -- so whatever the S&P 500 does, the index fund will mimic it. Historically, the S&P 500 has always recovered from every downturn it's ever faced. Even after the Great Recession in 2008, as well as the unprecedented crash earlier this year, the S&P 500 managed to bounce back stronger than ever.

^SPX Chart

^SPX data by YCharts

Again, nobody knows whether the current market downturn will get worse in the coming weeks or months, but even if it does, there's a very good chance the S&P 500 will recover. There will always be ups and downs over the years, but in general, the S&P 500 has experienced a strong upward trend over time. That means even if the market crashes, it's extremely likely your index funds will recover.

Is it the right time to invest?

S&P 500 index funds are long-term investments, and there's never necessarily a bad time to invest for the long term. In fact, market downturns are one of the best opportunities to invest, because stock prices are lower, so you can get more for your money.

The key is to make sure you can leave your money alone for years or even decades after you invest. S&P 500 index funds do see positive returns over time, but like any investment, they are subject to volatility in the short term. So to make the most of your money, your best bet is to invest and then sit back and wait.

A market crash may be looming, but that doesn't have to be a scary thought. By investing in the right places and taking advantage of S&P 500 index funds, you can give your money the best shot possible at surviving a market downturn.