Real estate investment trusts (REITs) can be excellent investments for those looking to generate passive income. A significant benefit of REITs is that they allow you to invest in income-producing real estate without shelling out significant capital up front.

REITs are also attractive thanks to their market-beating returns. During the past 25 years, REITs have delivered an 11.4% annual return, crushing the S&P 500's 7.6% annualized total return in the same period.

Hand using a piece of chalk to draw an upward curve on a chart, with dollar signs of staggered sizes beneath.

Image source: Getty Images.

One reason for REITs' outperformance is their dividends. IRS rules require REITs to distribute 90% of taxable net income to investors through dividends, so these stocks can be quite appealing to income-focused investors. According to research from Ned Davis Research and Hartford Funds, companies that pay a dividend outperform the S&P 500, with less volatility, than those that don't.

Overall, REITs have underperformed the S&P 500 in the past decade. However, some subgroups continue to shine and deliver for investors. Here are three excellent REIT stocks that have crushed the S&P 500 during the past 10 years.

1. Digital Realty Trust

Digital Realty Trust (DLR 0.48%) owns 309 data centers in 28 countries and provides co-location, interconnection, cloud services, and other solutions for its customers. It invests in gateway data centers that serve as hubs for internet and data communications in major metropolitan areas.

Data-center properties have been a hot commodity for years, thanks to the growing digitalization of the economy. This has created an explosion of data, requiring more cloud solutions and other information technology. Because of the high costs of building and maintaining facilities, many companies -- including IBM, Oracle, Meta Platforms, JPMorgan Chase, and Verizon -- turn to Digital Realty for its data centers.

During the past decade, Digital Realty's funds from operations (FFO) grew by 278%, or 14.2% compounded annually, showing the strength of the market for data centers. The stock's total return (including reinvested dividends) was 332%, outperforming the S&P 500's 240% return.

Positive trends should continue. According to projections by McKinsey & Company, demand for data centers is expected to grow by 10% annually through 2030, and Digital Realty is in an excellent position to capitalize on this long-term momentum.

2. Extra Space Storage

Extra Space Storage (EXR 2.94%) provides storage properties and is the largest self-storage management company in the U.S. It aims to have highly visible storage facilities in areas with large populations. At the end of last year, it had 2,377 locations. More than 87% of Extra Space Storage's revenue is derived from rent; the rest comes from tenant reinsurance and management fees.

Self-storage properties have enjoyed high demand from residential consumers who need a place to keep their extra items and businesses that use the space to store excess inventory, documents, or other supplies.

Because these properties are relatively inexpensive to build and operate, they can generate excellent returns. During the past decade, Extra Space Storage's FFO increased 374%, or 16.4% compounded annually, while its dividend payout increased by 305%. Its total return of nearly 400% crushed the S&P 500's return during the same period.

According to CBRE Group, the U.S.'s largest commercial real estate company, the market for self-storage facilities will remain robust. Additionally, supply chain issues, elevated construction costs, and high interest rates have prevented overdevelopment in the sector, which should bode well for operators like Extra Space Storage.

3. Prologis

With more than 1.2 billion square feet of logistics space, Prologis (PLD 0.74%) specializes in facilities serving businesses-to-business enterprises and online retail fulfillment centers, with customers including Amazon, Home Depot, FedEx, and UPS.

It has benefited from the shift to e-commerce and online shopping. In addition, online retailers are concerned about building more resilient supply chains after the pandemic shutdowns, and demand for warehouse, storage, and distribution space has risen.

During the past decade, Prologis's FFO grew 495%, or 19.5% compounded annually, and its dividend payout increased by 93%. Its total return of 366% has crushed the S&P 500 during the same period. A robust market and the ability to raise rents have been a tailwind for Prologis more recently. During the past few years, its occupancy rate has been over 97%. Meanwhile, from 2019 through 2023, rents have risen by 85%.

One thing to watch is the new supply of logistics facilities hitting the market. A few years back, strong demand and low interest rates drove developers to build more facilities and add to the market supply. Building peaked in 2022 and many of these developments will start coming on line in 2024, which could result in slower rent growth for the REIT.

Prologis's management believes demand will outpace supply and that it can boost rents by 4% to 6% in the coming years, helping to increase core FFO by 9% to 11%. Finally, ongoing e-commerce trends should remain robust for the next several years, with the warehousing and storage services market projected to grow by 7.7% annually through 2030.