By the end of this year, 12,000 stores are projected to close, and Amazon stands to benefit, according to a Goldman Sachs analyst.

The rate of store closures is accelerating, and this, along with faster shipping and strengthening consumer spending, is driving consumers to pony up more of their dollars online, said Goldman analyst Heath Terry.

"With apparel & accessories recording the largest share of store closures, we believe Amazon will be a primary beneficiary considering this segment already sees (more than) 20% online penetration," he wrote in a note to clients Tuesday. He also said companies working to make the purchasing process convenient, such as Amazon's $800 million investment in same-day delivery, will convince more consumers to purchase online.

"Pure-play eCommerce companies like Amazon continue to benefit from greater access to consumer data and purchase history that enables not only compelling consumer experiences but also delivers efficiency and competitive benefits through advertising, product recommendations, and dynamic pricing," said Terry.

Store closures could lead consumers to use a service like Stitch Fix, which ships stylist-chosen apparel to subscribers, he said. The company has begun to focus on mass-market consumers outside of New York and California.

The store closures of major retailers have been caused by "slow or declining sales growth, leveraged balance sheets, and rising occupancy costs," he wrote.

Globally, the e-commerce industry is expected to grow at a 18% compound annual growth rate over the next three years, driven primarily by strength in three regions. In China, the economy is still trending toward being consumption-led, and top retailers are expanding wallet share there, especially in low-tier cities. In India, online retail companies have started organizing supply chains, by aggregating merchants and creating infrastructure for delivery and payments. In Latin America, e-commerce is expected to grow more than 20%.