LOS ANGELES—Prager University, a nonprofit that produces short, educational videos from conservative perspectives, is suing YouTube and its parent company, Google, claiming the tech giant is illegally censoring some of its content as part of a wider effort to silence conservative voices.

A lawsuit filed Monday evening in federal court in San Francisco says YouTube’s more than 30 million visitors a day make the site so elemental to free speech in the digital age that it should be treated as a public forum. The suit argues the site must use the “laws governing free speech,” not its own discretion, to make decisions about what to censor.

The nonprofit, known as PragerU, alleges that by limiting access to some of its videos without clear criteria YouTube is infringing on PragerU’s First Amendment rights.

YouTube said it didn’t have immediate comment because it hadn’t yet reviewed the suit. The site is owned by Google, part of Alphabet Inc.

The suit heightens a debate over tech companies’ increasing influence on public opinion and how they should police content on their sites. With the internet enabling the spread of misinformation, hate speech and foreign propaganda—especially around the 2016 U.S. election—politicians, academics and the media are increasing scrutiny on the role a handful of tech giants play in modern society.