The e-commerce sector got hit hard last year due to difficult comparisons with the boom earlier in the pandemic and macroeconomic headwinds.

However, the online retail channel should still have a bright future in front of it as it continues to gain market share from the traditional brick-and-mortar channel in categories like groceries, home furnishings, and car parts, as well as more traditional categories like electronics and apparel.

If you're looking to capitalize on the long-term opportunity in e-commerce, here are three stocks worth buying now.

Person in living room opening package.

Image source: Getty Images.

1. Shopify

Shopify (SHOP 4.90%) has come to dominate the e-commerce software space, serving online sellers from small businesses to Fortune 500 companies. 

For years, the company was a market darling, putting up huge growth in revenue as the stock marched higher. However, shares collapsed last year as sales growth slowed and valuations compressed across the tech sector. 

However, that pullback sets up a buying opportunity, as the stock is still growing and should benefit from the continued expansion of e-commerce and new online retail businesses.

Shopify hasn't reported fourth-quarter earnings yet. But the company said that currency-neutral gross merchandise volume jumped 21% over the 2022 Black Friday weekend, and it just announced its first price hike in 12 years across most of its subscription tiers, showing confidence in its pricing power.

In addition to giving its profit margins a boost, the price hikes will also give it more money to reinvest in the business for projects, like its recent acquisition of Deliverr, to improve its fulfillment network and fend off competition from Amazon.

With a market cap of $61 billion, there's still a lot of upside potential in Shopify.

2. Etsy

Etsy (ETSY 2.86%) carved out its own niche in e-commerce with its marketplace focused on handmade and unique goods. That platform attracted millions of sellers and has been particularly strong in areas like gifts, jewelry, apparel, accessories, and home goods.

Last year was a challenging one for the company after growth surged in 2021. Gross merchandise sales were flat over 2022, but growth should return to the platform as e-commerce trends normalize.

Etsy also has a huge addressable market in front of it and will continue to grow as it makes investments in tech infrastructure and user interface, adding features like image searches, video listings, and standard return policies. 

The company also generates strong profit margins thanks to its marketplace model, reporting an adjusted EBITDA margin of 28%. GAAP profits were affected by a $1 billion write-down for two of its acquisitions, a sign it overpaid for those deals. But the company sees opportunity to grow beyond the Etsy marketplace. It's applying a similar strategy to Reverb, a musical instrument marketplace, Depop, an app for vintage and secondhand clothes, and Elo7, an Etsy-like marketplace in Brazil.

Investing in those platforms and making new acquisitions also adds to the company's growth opportunity. 

With little direct competition in the handmade goods niche, Etsy should rebound strongly when the macroeconomic headwinds fade.

3. MercadoLibre 

Latin American e-commerce operator MercadoLibre (MELI 1.96%) has been a longtime winner on the stock market, and its recent performance shows why. 

While U.S. e-commerce stocks have struggled during 2022, MercadoLibre posted 61% currency-neutral growth, and the company diversified beyond e-commerce into businesses like payments, logistics, ads, and lending.

MercadoLibre's payments business, MercadoPago, continues to skyrocket thanks to soaring growth off the MercadoLibre platform. This growth now makes up most of MercadoPago's payments volume and doubled over each of the last four quarters.

Additionally, the company is investing in its fast-growing ads business. This offers similar benefits to Amazon's advertising business, and should generate high margins due to MercadoLibre's position at the bottom of the purchase funnel where customers know what they want to buy.

Because of the growth of businesses like ads, payments, its third-party marketplace, and credits, MercadoLibre's operating margin has ramped up. It reached a record 11% in the third quarter, and profits should continue to expand. 

With a large market and growing middle class in Latin America, and a brisk growth rate even in a challenging environment, MercadoLibre has a bright future in front of it.