Can Google outsell Amazon and eBay?

Google will launch buy buttons on its search-result pages in coming weeks, a controversial step by the company toward becoming an online marketplace rivaling those run by Amazon.com and eBay Inc.

The search giant will start showing the buttons when people search for products on mobile devices, according to people familiar with the launch.

The buttons will accompany sponsored—or paid—search results, often displayed under a “Shop on Google” heading at the top of the page. Buttons won't appear with the nonsponsored results that are driven by Google’s basic search algorithm.

If shoppers click on the buy buttons, they will be taken to another Google product page to complete the purchase, the people explained. On that page, they will be able to pick sizes and colors and shipping options, as well as complete the purchase, one of the people said.

The products will still be provided and sold by retailers, rather than by Google. Retailers including Macy’s Inc. are in talks with Google about taking part in the launch, the people added. A Macy’s spokesman didn't respond to a request for comment on Friday.

Google won't show buy buttons when shoppers search on desktop computers, and the company is starting the program with a small percentage of the search traffic it handles.

But the move marks a major and potentially risky strategy shift that will turn the company into more of an online transactional business, rather than simply a provider of links to information elsewhere on the internet.

Some retailers said they worry the move will turn Google from a valuable source of traffic into a marketplace where purchases happen on Google’s own websites. The retailers, who wouldn't voice their concerns publicly, fear such a move will turn them into back-end order takers, weakening their relationships with shoppers.

Retailers currently send Google data feeds on the products they are selling online, and then pay Google when shoppers click through to their websites.

To mollify retailers’ concerns, Google will allow consumers to opt into the same marketing programs that they would be exposed to had they made the purchase on the retailers’ own websites, one of the people said. That means retailers will get address information and likely email addresses for future marketing efforts as long as shoppers opt in.

The product pages where Google handles the purchases will be heavily branded for the retailers selling the items, and any recommendations for other things to buy will only be from that merchant, one of the people said.

But Google will let shoppers input payment credentials such as credit-card numbers one time, and the company will store those and automatically load them for future purchases on its shopping pages.

Google won't send those payment details to the retailers, one of the people said. After Google gets the money from shoppers it will pass the payment on to the retailer. Depending on how the consumer chooses to pay, Google or the retailer may show up on customer billing statements, one of the people said.

Google will offer a wide range of payment options, including digital payment methods from other providers, the person added.

Google will still be paid by retailers through its existing advertising model, rather than taking a cut of the sales price of items—the usual way online marketplaces like Amazon’s and eBay’s work.

In the Google program, the company will indicate on its first mobile shopping results page that items are available to buy on Google, and when shoppers click through to the product page, retailers will pay based on those clicks, one of the people familiar with the situation said.

Google is making the changes because of the surge in smartphone usage. It said recently that searches on mobile devices now outnumber those on personal computers in 10 countries, including the U.S. and Japan.

Smaller phone screens have less space for ads. On top of that, mobile ads often fetch lower prices than similar ones on desktop computers since they may lead to fewer sales.

One reason: it can be a bigger hassle to navigate a retailer’s page, and enter credit-card and shipping information, on small smartphone screens with error-prone keyboards.

Instead, shoppers are turning to mobile apps from Amazon, eBay and other rivals where their personal information is already stored and purchases can be done with fewer clicks.

That reduces the number of lucrative product searches that Google can run ads alongside.

In response, Google is making changes to its search engine and ad systems to provide information directly on its results pages, rather than giving them links to other sites.

Google has told retail partners that it is adding a buy button to reduce friction for users on mobile devices, increasing the chances that they will make a purchase, known as a “conversion” in the digital ad business, two of the people said.

This is a delicate balance for the company, and it is stressing to partners that shoppers will still belong to the retailer, rather than Google.

It can’t upset large retailers because they are among the largest spenders on the company’s search ads, according to a study last year by Ad Age and search marketing firm AdGooroo.

In the past, Google executives have tried to quell talk of an online marketplace, where consumers buy goods from a variety of merchants. However, the company has been slowly adding marketplace features that mimic Amazon, such as detailed product pages with reviews, better photos, specifications and prices.

Amazon’s marketplace is thriving, with more than two million merchants selling products on its site and giving a cut of their sales to the company. But most larger retailers don’t work with Amazon because they want to avoid price competition, and they collect valuable customer information through their own websites. An effort by eBay to get large retailers to sell on its marketplace has produced mixed results.

Google told retailers last year that it was considering a buy button, sparking concern among some companies in the sector.

Write to Alistair Barr at alistair.barr@wsj.com and Rolfe Winkler at rolfe.winkler@wsj.com