As stock prices continue to fall, it's not an easy time to be an investor. The S&P 500 is well into correction territory and creeping closer to a bear market. If you have money tied up in the stock market, this downturn can be difficult to stomach.

While nobody knows how long this downturn will last, the market will recover eventually. Market corrections and even crashes are normal, and it's only a matter of time before stock prices bounce back.

In the meantime, though, there are a few things you can do to keep your money as safe as possible.

Young person sitting at a desk looking at documents.

Image source: Getty Images.

1. Beef up your emergency fund

Market slumps are some of the worst times to sell your investments. Stock prices are at their lowest, and if you withdraw your money during a downturn, you will likely end up selling your investments for less than you paid for them.

For that reason, it's smart to have at least a few months' worth of savings stashed in an emergency fund. This way, if you face an unplanned expense during a market downturn, you can afford to cover it without having to tap your investments.

2. Make sure you're diversified

A well-diversified portfolio can give your investments a much better shot at recovering from a downturn. Not all stocks will survive periods of volatility, and if all your eggs are in one basket, so to speak, you risk losing a lot of money if your investment doesn't bounce back.

While there's no hard rule as to how many stocks you should own, a general rule of thumb is to make sure your portfolio contains at least 25 to 30 stocks from a variety of industries. This will give you more protection against downturns, because if one or two of your stocks do not perform well, your overall portfolio won't be hit as hard.

3. Double-check your asset allocation

Asset allocation refers to how much of your portfolio is allocated toward stocks versus bonds, and it's especially important for those nearing retirement age.

When you're young and still have many years before you plan to retire, you can afford to invest more aggressively in stocks. Even if your portfolio takes a hit during a downturn, you have plenty of time to let it recover before you need that money.

As you get older, though, your portfolio should gradually become more conservative. Bonds and other conservative investments often see significantly lower returns than stocks, but they're also less affected by market volatility. If you're close to retirement, shifting your portfolio more toward bonds can keep your investments safer when you need them the most.

4. Review your investments

The investments you choose will be key to how you fare during a market downturn. Risky stocks from shaky companies can sometimes perform well when the market is thriving, but they're also more likely to crash and burn during periods of volatility.

The best investments, then, are the ones from strong companies with solid underlying business fundamentals. The healthier the overall organization, the better its chances of surviving a market downturn.

These types of stocks may not see explosive returns in the short term, but investing is a long-term strategy. When you choose your investments based on the overall strength of the company, it's far more likely you'll see positive average returns over the long run despite volatility.

Market downturns are challenging, and it's normal to feel nervous about the future. But they won't last forever, and the market will recover eventually. By taking a few steps to prepare now, you can worry less knowing your money is as safe as possible.