A massive selloff in Chinese technology stocks accelerated on Tuesday, as investors unnerved by China’s widening crackdown on Internet companies and other industries sold down their holdings of many popular stocks.

The Hang Seng Tech Index in Hong Kong, which includes stocks such as Tencent Holdings Ltd. and Alibaba Group Holding Ltd. , tumbled 8%, registering its third day of declines. The city’s flagship Hang Seng Index dropped 4.2%.

In mainland China, the CSI 300 benchmark retreated 3.5%. The Chinese yuan weakened against the dollar, with the offshore currency trading beyond 6.50 yuan per dollar, versus a previous close of 6.4834, according to FactSet.

Among big individual stocks, online gaming and social-media giant Tencent fell 9%. The selloff pushed Tencent’s market value down to about $544 billion, according to FactSet—meaning it has lost about $390 billion of market capitalization since peaking in mid-February. Hong Kong-listed shares in Alibaba, China’s biggest e-commerce company, also lost ground, falling 6.4%.

China is months into a campaign to rein in big tech that has spanned issues such as data security, monopolistic behavior and financial stability. The regulatory clampdown, which has entangled companies such as Alibaba, its sister company Ant Group Co., and the ride-hailing giant Didi Global Inc., continues to unfold.

Drastic moves unveiled over the past week to curtail the after-school tutoring industry have also rattled investors, causing the stocks of education companies to lose most of their market value within days. The Hong Kong-listed shares of New Oriental Education & Technology Group Inc. fell for a third consecutive session on Tuesday, losing 71% over those days.

“We’re getting to a stage where people are very worried about the raft of regulations that are coming out. They are very difficult for markets to forecast,” said Herald van der Linde, the head of Asia equity strategy at HSBC.

Given the high volatility, risk managers might be telling some portfolio managers to reduce their holdings, even if the investors would prefer to seek out bargains, said Mr. van der Linde.

Among other major online companies, food-delivery giant Meituan retreated 18%. A day earlier, Chinese regulators had issued guidelines on how companies such as Meituan should treat delivery drivers.

News that Tencent had briefly suspended new sign-ups for its hugely popular WeChat messaging service may also have unsettled some investors. The company said the halt was for a technical upgrade and registrations would resume in early August.

“I think that news would probably been a non-event if we were not in the midst of a sell-down,” said Dave Wang, a portfolio manager at Nuvest Capital in Singapore, and a Tencent investor.

Mr. Wang cited a number of other reasons for the stock’s decline, including the broader declines in Chinese tech, Tencent’s status as a large benchmark stock while indexes were selling off, and mainland investors reducing their holdings via the Stock Connect program that links onshore markets with Hong Kong.

Some high-tech companies that investors and analysts see as less exposed to a harsher official stance were spared. The Hong Kong shares of Semiconductor Manufacturing International Corp., a Chinese chip maker, jumped 5.8%.

“The clipping of wings in various sectors is, I think, about the focus on quality rather than quantity of growth,” said Patrick Bennett, a macro strategist at CIBC World Markets in Hong Kong.

“If these regulatory measures are designed for that end, then I think the medium to long-term prospects are good, but it could involve some short-term pain or dislocation, as we’re seeing now,” he said.

The Hang Seng Tech Index’s selloff took its year-to-date declines to nearly 26%. It has pulled back after peaking in mid-February.

Mr. van der Linde said market sentiment on Chinese stocks had swung sharply in the past few months, in a classic example of market psychology shifting quickly from euphoria to a darker mood. “We’ve gone from ‘this is the cool holding, everybody needs to have this’ to ‘nobody can invest in this ever again,’ in just six or seven months,” he said.

Write to Quentin Webb at quentin.webb@wsj.com and Chong Koh Ping at chong.kohping@wsj.com