Online shopping has been one of the most powerful consumer trends in the past couple of decades. And even though there has been some normalization following the pandemic surge, over time, it's hard not to see e-commerce spending rising meaningfully in the future. 

With this framework in mind, it's a wonderful idea to try and identify companies benefiting from this growth potential. Here are three e-commerce stocks investors can buy and hold for the next decade. 

1. Amazon 

When talking about e-commerce businesses, Amazon (AMZN 2.94%) probably comes to mind first. It helped create the secular trend of online shopping, with its focus on obsessing over the customer and trying to deliver a superior experience. 

Today, Amazon is known for having a massive merchandise selection, extremely low prices, and free and fast delivery. Revenue related to its e-commerce operations totaled a whopping $338 billion in 2022, demonstrating the company's gargantuan scale. 

It's true that Amazon experienced a bit of a slowdown in the past several quarters, as high interest rates and inflation discourage excessive spending from consumers. This situation should prove to be temporary, and once the economy is on more solid footing, Amazon's sales are set to continue rising well in the double digits. 

With its huge lead in online shopping, especially in the U.S., Amazon should keep benefiting as more spending shifts away from brick-and-mortar retailers. This provides a nice long-term tailwind that can drive growth. 

The stock currently trades at a reasonable valuation, trading at a trailing price-to-sales (P/S) multiple of 2.4. That represents a notable discount compared to its historical five-year average. Plus, with shares down about 33% from their peak price, investors can buy on the dip. 

2. Etsy 

Etsy (ETSY 0.16%) is a much smaller business, compared to Amazon, in the e-commerce space, but investors shouldn't count it out. It focuses exclusively on selling handmade and vintage merchandise on its online marketplace, with products ranging from jewelry and apparel to home furnishings and collectibles. 

And this strategy has caught on. As of June 30, Etsy had 96.3 million active buyers and 8.3 million active sellers on its platform, both figures up year over year and significantly higher than prior to the pandemic.

This increase in buyers and sellers is a good sign, as it shows that Etsy is continuing to get bigger on top of its huge gains in 2020 and 2021. 

Despite having a larger user base, gross merchandise sales of $6.1 billion through the first six months of 2023 declined 2.7% compared to the same period last year. Macro headwinds might deserve the blame here, as consumers could be cutting down a bit on discretionary spending. 

Nonetheless, Etsy's capital-light business model means that it generates lots of free cash flow, which ensures it can navigate any economic turbulence, while at the same time investing in improving its technological capabilities.  

Shares have been beaten down, selling 79% below their peak price from about two years ago. Investors can buy Etsy stock at a cheap forward price-to-earnings ratio of just 13.3. 

3. Shopify 

Perhaps the most notable trait about Shopify (SHOP 3.75%) is its tremendous growth. In the second quarter, revenue totaled $1.7 billion and gross merchandise volume (GMV) totaled $55 billion. These figures are 594% and 504% higher, respectively, than in the same quarter in 2018.

Gains like these are only possible if the company is finding lots of success at attracting and retaining customers. 

What makes Shopify unique is that it provides the technological infrastructure for businesses of all sizes to start selling their goods and services online. Some examples of tools include checkout options for both online and brick-and-mortar settings, marketing features, and access to apps created by third-party developers. 

By continuing to offer more valuable services to its merchant base, Shopify can benefit by driving stickiness. Once these merchants use the platform, I'd bet they are unlikely to switch service providers due to the headaches that would cause.  

According to Statista, Shopify commands 28% market share among e-commerce platforms in the U.S., putting it in first place. And as a clear sign of management's ability to increase monetization, the attach rate, which measures the amount of GMV that's counted as revenue, hit a record high of 3.08% in Q2. 

With the stock down 70% from its all-time high, now might be one of the best times to become a shareholder.