Many e-commerce stocks stumbled over the past year as investors fretted over their slowing growth in a post-pandemic market. The impact of inflation on consumer spending made them even less appealing, and rising interest rates exacerbated that pressure by driving investors toward more conservative value stocks.

Yet as consumers continue to buy more products online, the global e-commerce sector could grow at a compound annual rate of 27% between 2022 and 2027, according to Infiniti Research. Therefore, it's still a good idea to tune out the near-term noise and buy a few leading e-commerce stocks for the long term. Here are three solid online shopping stocks that fit the bill: Amazon (AMZN -0.52%), Etsy (ETSY -0.62%), and Pinduoduo (PDD -0.77%).

A person uses a PC to shop online for a purse.

Image source: Getty Images.

1. Amazon

Amazon's stock was cut in half in 2022 as the growth of its e-commerce and cloud businesses decelerated. Its e-commerce business initially struggled with tough comparisons to its growth spurt during the pandemic, and that slowdown was exacerbated by supply chain disruptions (especially for its third-party sellers in Asia) and inflationary headwinds.

Its cloud business, which had grown rapidly throughout the pandemic as more people accessed online services, also cooled off as rising interest rates and other macroeconomic headwinds prompted big enterprise customers to rein in their spending.

As Amazon's core businesses lost their mojo, it ramped up spending on new Prime features and fresh media content. As a result, analysts expect its revenue to only rise 9% in 2022 as it posts a net loss.

That combination of slowing growth and rising expenses rattled the bulls, but investors shouldn't overlook Amazon's strengths. The company still serves over 200 million Prime subscribers, and it continues to grow offline with Whole Foods, Amazon Go, and its other brick-and-mortar stores.

The Prime ecosystem continues to expand with more streaming videos, songs, and video games, while Amazon Web Services will likely remain the world's largest cloud infrastructure platform for the foreseeable future. All of those strengths suggest Amazon will recover from its cyclical downturn and its stock will hit new highs over the long term.

2. Etsy

Etsy's stock also took a heavy hit, declining roughly 43% in 2022, as the online marketplace for artisans faced many of the same post-pandemic headwinds as Amazon. However, Etsy's slowdown was further complicated by challenging comparisons to unusually high sales of handmade masks during the pandemic, as well as inorganic gains from the acquisitions of musical instruments marketplace Reverb, fashion resale marketplace Depop, and Brazilian handmade marketplace Elo7.

Analysts expect Etsy's revenue to rise 8% in 2022 as it posts a net loss. The integrations of Reverb, Depop, and Elo7 will squeeze its near-term margins, but those marketplaces could also broaden its appeal as an alternative to Amazon.

Etsy faces plenty of near-term headwinds, but it continues to grow even as Amazon and other e-tailers launch similar marketplaces. It served 94.1 million active buyers and 7.4 million active sellers in the third quarter of 2022, compared to 24 million active buyers and 1.6 million active sellers at the end of 2015. It carved out that defensible niche with its first-mover advantage and low seller fees, and it will likely continue to grow as more shoppers seek out unique products.

3. Pinduoduo

Shares of Pinduoduo, the third-largest e-commerce company in China after Alibaba and JD.com, soared 45% in 2022. Pinduoduo continued to grow faster than both of its larger competitors, thanks to the rapid expansion of its agricultural business that delivers fresh produce from farmers directly to customers. Its core discount marketplace, which encourages shoppers to team up for bulk purchases, also thrived as the Chinese economy slowed down.

Pinduoduo was unprofitable for many years before it discontinued its lower-margin first-party marketplace and aggressively reined in its spending. Those cost-cutting efforts enabled it to finally generate a full-year net profit in 2021.

Even though Pinduoduo served a whopping 882 million annual active buyers at the beginning of 2022, it largely avoided the scrutiny of China's antitrust regulators, which fined and cracked down on Alibaba in 2021. Instead, Pinduoduo likely benefited from the government's decision to bar Alibaba's e-commerce division from striking exclusive deals with merchants, using aggressive loss-leading promotions, and making big acquisitions. Analysts expect Pinduoduo's revenue and earnings to rise 45% and 174%, respectively, in 2022.

Pinduoduo notably doesn't operate a cloud infrastructure platform, streaming video platform, or other unprofitable media businesses like Alibaba. That relative simplicity makes Pinduoduo an attractive and straightforward play on China's growing e-commerce sector, which should perk up again in 2023 as the country finally lifts its zero-COVID policies.