The world was already hurtling toward e-commerce accounting for a greater percentage of total retail sales before the pandemic struck, and now it is climbing at an inexorable rate.

eMarketer says global retail sales fell by 2.8% in 2020 to $23.6 trillion as consumers shifted their habits to buying online. E-commerce sales rocketed over 25% last year, hitting 4.2 trillion, or nearly 18% of all retail sales. While reopened economies let the brick-and-mortar world begin growing again in 2021 -- eMarketer forecasts retail sales will hit $25 trillion worldwide this year -- e-commerce is still growing by double-digit rates. 

Global online sales should climb $4.9 trillion and soon account for one out of every five retail sales made. There are a few e-commerce names that will garner the lion's share of these sales, and they should be considered for every investor's portfolio. 

Two people smiling at laptop.

Image source: Getty Images

1. Amazon

It should surprise no one that Amazon (AMZN 3.43%) is on the list of leading e-commerce stocks to buy. As the overwhelmingly dominant website in the U.S., Amazon.com is expected to account for 41.4% of all online spending in the U.S. this year.

Its nearest competitor is Walmart, but at just a 7.2% share of the e-commerce pie it trails distantly in second place. eBay, with a 4.3% share, and Apple at 3.8%, are the nearest anyone else gets. In fact, Amazon's share is more than its next nine competitors combined and will contribute more than half of the growth experienced in U.S. e-commerce sales.

Equally important is Amazon Web Services (AWS), which serves as the backbone for the internet presence of thousands of U.S. businesses. It is also the unquestioned leader in cloud infrastructure market share, where it has a 32% share of worldwide cloud infrastructure spending. Set up to be Amazon's key generator of operating cash flow, AWS remains its most profitable segment and should be uppermost on any investor's list of e-commerce stocks to buy.

2. Alibaba

The Chinese counterpart to Amazon is Alibaba (BABA 0.59%), and simply because the Chinese market is orders of magnitude larger than that of the U.S., the number of sales it transacts is larger, too.

Where Amazon Prime Day sales were estimated to have hit a record $11.2 billion globally over the two-day shopping extravaganza, Alibaba recorded $84.5 billion in gross merchandise volume (GMV) for its Singles Day event, an 11-day affair that has grown wildly over the past seven years and now involves more sellers and retailers than just Alibaba.

Despite a continued crackdown on tech names by Beijing, which tended to mute sales this year, Alibaba continues to grow, although its latest earnings report was seen as relatively weak. It recently announced a turnaround plan to reinvigorate sales growth that includes adding more VIP members (who tend to spend more than non-members), targeting older shoppers, and using artificial intelligence and automation to increase advertising efficiency.

With its stock down 55% from highs hit a year ago, Alibaba is an especially attractive e-commerce stock to buy right now.

Person with credit card smiling at shopping bags.

Image source: Getty Images

3. JD.com

You can't mention Alibaba without also mentioning JD.com (JD 6.12%), although it has a different business model than its rival. Operating more like eBay than Amazon because it's a platform for third-party sellers rather than selling products itself, JD is actually a more potent force in China's e-commerce circles, as it is China's largest online retailer and its biggest overall retailer. 

On Singles Day this year, JD generated $54.6 billion in GMV across the sales event, up 28% from last year. It has also not come under the same sort of scrutiny from regulators that Alibaba has, and it maintains it has stringent protocols in place that are aligned with Beijing's mandates. It's also said the restrictions being contemplated on companies, such as price controls, could benefit it as it would protect JD.com's prices from being undercut by the competition.

JD.com also has one of the largest fulfillment infrastructure networks of any e-commerce company in the world, with approximately 1,300 warehouses offering a total of some 23 million square meters of space. It says it is the only e-commerce platform in the world to provide small- to medium-sized warehousing, oversized warehousing, cross border, cold chain delivery, frozen and chilled warehousing facilities, B2B, and crowdsourcing logistics.

Analysts forecast JD.com will be able to grow earnings at a compound rate of 24% annually, and with the stock trading at five times next year's earnings and 18 times the free cash flow it produces, it's an e-commerce stock worth buying today.