Amazon.com Inc. AMZN 2.49% is planning to build and expand Whole Foods stores across the U.S., people familiar with the plans said, to put more customers within range of the e-commerce giant’s two-hour delivery service.

The push would bring Whole Foods to more suburbs and other areas where the natural grocer is quickly adding customers since the merger. That is a shift from the layoffs and slowing store growth Whole Foods experienced for several years before Amazon bought it in 2017 for roughly $13.5 billion.

Amazon and Whole Foods declined to comment on new store construction or spending. In the Rocky Mountain region, one person familiar with the plans said, Whole Foods employees have visited potential retail spaces in parts of Idaho, southern Utah and Wyoming, where the grocer doesn’t have stores now.

Some of those spaces were about 45,000 square feet, slightly larger than the average Whole Foods store. The supermarket chain is using extra space in its stores to accommodate Amazon delivery and pickup from online orders.

The build-out would also intensify competition among grocers that are already fighting to retain customers. Supermarkets have been holding down prices and adding new services as consumers shift more of their shopping online. Other retailers are also widening the range of goods they sell, from discount grocers like Aldi and Lidl to pharmacy chains and convenience stores.

“Strategic investments to improve Whole Foods will only increase the already intense competitiveness in the grocery space,” said Bob Goldin, co-founder of consulting group Pentallect Inc.

Amazon offers Prime Now, a two-hour delivery option to members of its Prime subscription service in more than 60 cities, and online grocery pickup from Whole Foods stores in as little as 30 minutes from nearly 30 cities. Amazon plans to expand those services to nearly all of its roughly 475 Whole Foods stores in the U.S., according to another person familiar with the plans. Amazon also wants to use benefits for Prime members to attract new customers to Whole Foods and draw them back more often.

The Prime Now service is becoming more popular. Amazon said it delivered more turkeys than ever through Prime Now and the company’s AmazonFresh service this past Thanksgiving, while Whole Foods broke a record for Thanksgiving bird sales. Data firm Numerator found in a recent survey of about 1,200 shoppers that nearly half said they were shopping at Whole Foods more because of Prime promotions.

Is Amazon Going to Rule the World? Amazon wants to deliver everything you want to your doorstep, anywhere in the world. But the e-commerce giant faces several challenges in its pursuit of a global empire. WSJ's Karan Deep Singh breaks down the basics with the help of an Amazon delivery box.

Ed Dixon, a 48-year-old art gallery owner in Dayton, Ohio, recently ordered rye bread, vegetarian burgers and chocolate through Prime Now.

“This will definitely save me some time, gas and a bit of frustration since grocery stores are only closing near where I live,” Mr. Dixon said.

Amazon’s investments are helping to improve morale at Whole Foods after a stretch of falling sales and staff cuts. Some Whole Foods workers have pushed to unionize this year for better benefits and working conditions.

Whole Foods chief executive and co-founder John Mackey said in a recent video to employees that he wants to address worker concerns, improve communication and focus on career development in 2019. He said sales have grown since Amazon took over.

“At the beginning of the second year of this merger, we are going to pivot back to team member growth and happiness,” Mr. Mackey said in a November video to employees viewed by The Wall Street Journal.

Newsletter Sign-up Notes on the News Today’s headlines, news in context, and good reads you may have missed, with Tyler Blint-Welsh. PREVIEW

Amazon said in September that it was raising its minimum wage—including at Whole Foods—to $15 an hour, and that it would restore a practice of making stock grants to Whole Foods employees.

While sales have grown at Whole Foods, one of the people close to the company said that profit hasn’t. Prime discounts have hurt margins at Whole Foods. Amazon is focused for now on getting Prime programs running across Whole Foods stores, according to the people.

Investing heavily to boost growth is part of Amazon Chief Executive Jeff Bezos’s well-worn playbook. Inside Amazon, employees frequently refer to what they call the flywheel effect: the idea that more product selection and growth leads to lower costs and prices, which gives customers reason to keep shopping.

Amazon lost money or made a meager profit for years. The company this year reported record profitability, including $2.88 billion on $56.58 billion of revenue in its latest quarter.

Write to Heather Haddon at heather.haddon@wsj.com and Laura Stevens at laura.stevens@wsj.com