Google said it is shutting down Stadia, which launched in 2019, because the videogame service didn’t have enough users. 

“While Stadia’s approach to streaming games for consumers was built on a strong technology foundation, it hasn’t gained the traction with users that we expected,” Phil Harrison, Stadia’s vice president and general manager, said in a blog post.

The idea behind Stadia was that users could stream games directly to devices, like their TVs or phones, and didn’t need consoles such as Sony Group Corp.’s PlayStation and Microsoft Corp.’s Xbox to play games.

The offering faced skepticism from some analysts, who said there was tough competition from other videogame companies.  

Google’s parent company, Alphabet Inc., recently logged its slowest quarterly sales growth in two years as some advertisers pulled back spending. The company has also planned to slow hiring the rest of this year.

A Stadia game controller displayed at a Google event in 2019.

Photo: Jeenah Moon/Bloomberg News

Other tech companies have also invested in videogames in recent years. Sony and Microsoft consider cloud gaming to be the future of game distribution. Microsoft is trying to buy videogame company Activision Blizzard Inc. Facebook, Netflix Inc. and Amazon.com Inc. have introduced game-streaming offerings.

Mr. Harrison said Google is committed to gaming and sees ways to use Stadia’s technology in other parts of the company, such as the Google Play store and YouTube. 

Stadia users will still be able to play through Jan. 18, Mr. Harrison said. Users could get refunds for hardware purchases made through the Google Store as well as Stadia store purchases, he said.

Google and Alphabet have a long list of services they have shut down, including its social network, Google+, its RSS reader and its internet-balloon service, Loon.

Write to Allison Prang at allison.prang@wsj.com