Are you looking for relatively safe stocks to invest in as the economy remains so uncertain? Two options you might want to consider are Campbell Soup (CPB 0.70%) and PepsiCo (PEP 1.18%).

Both businesses produce and market multiple strong consumer brands that are considered staples by millions of consumers around the world. These strong brands enable these companies to raise the price of their products with minimal loss of market share and continue to perform well even amid outsized inflation. These investments also pay above-average dividend yields.

Let's explore what makes these two dividend stocks such exceptional buys, particularly for risk-averse investors.

1. Campbell Soup

Packaged foods company Campbell Soup is known for its wide array of soups and snacks. The company offers consumers a relatively inexpensive way to eat good meals at home. And Campbell's also enjoys some brand loyalty, as is evident from its ability to pass along price increases to customers without significant market share loss.

Earlier this month, the company released its second-quarter earnings results. For the period ending Jan. 29, Campbell's net sales rose by 12% year over year to $2.5 billion as it noted that it "benefited from favorable net price realization." And the company's earnings per share of $0.77 also jumped by 10%.

Those types of numbers are impressive for Campbell's, which investors wouldn't normally associate with being a growth stock. However, it does make for a solid income investment, with Campbell's paying a relatively high dividend yield of 2.8% -- that's better than the S&P 500 average of 1.7%. And with a payout ratio of around 55%, it's a safe dividend for the company to pay with room to safely grow the dividend going forward.

The resiliency of Campbell's and the consistent profitability of its business make it an exceptional buy for long-term investors to hang on to. In the past 12 months, the stock's total returns (which include dividends) hit 30%, which is a far better performance than the S&P 500's 7% decline during that same time frame. For risk-averse investors, Campbell's can be a relatively safe stock to invest your money into.

2. PepsiCo

Another strong consumer goods company is PepsiCo. Its stable of beverage and snack brands are staples in consumer homes and the company has also been able to raise prices to offset higher production costs, enabling it to grow and beat expectations. Last month, it released its fourth-quarter results, which proved to be strong. Revenue totaling $28 billion for the last three months of 2022 was higher than analyst estimates of $26.8 billion. And on the bottom line, adjusted earnings per share of $1.67 was also better than Wall Street projections of $1.65.

As with Campbell's, PepsiCo's price increases were key to the company delivering strong numbers, with the top line growing by 10.9% year over year last quarter and 8.7% for the full year. And PepsiCo anticipates more growth ahead in 2023, expecting organic revenue to rise by 6%.

The company said it plans to increase its dividend by 10% later this year, which would push its quarterly per-share payment up to $1.265, for an annual yield of approximately 2.9%. In addition to offering a strong yield, PepsiCo is a Dividend King and has raised its annual payouts consistently for decades, giving investors plenty of incentive to buy and hold the stock. Its payout ratio is at 70%, which is still modest enough to support future rate hikes.

Over the past year, PepsiCo's stock has generated total returns of 16%, as it too has proven to be a strong stock to own despite challenges in the economy.