When Sean Liang turned 30, he started thinking of the Curse of 35 — the widespread belief in China that white-collar workers like him confront unavoidable job insecurity after they hit that age. In the eyes of employers, the Curse goes, they’re more expensive than new graduates and not as willing to work overtime.

Mr. Liang, now 38, is a technology support professional turned personal trainer. He has been unemployed for much of the past three years, partly because of the pandemic and China’s sagging economy. But he believes the main reason is his age. He’s too old for many employers, including the Chinese government, which caps the hiring age for most civil servant positions at 35. If the Curse of 35 is a legend, it’s one supported by some facts.

“I work out, so I look pretty young for my age,” he said in an interview. “But in the eyes of society, people like me are obsolete.”

China’s postpandemic economic rebound has hit a wall, and the Curse of 35 has become the talk of the Chinese internet. It’s not clear how the phenomenon started, and it’s hard to know how much truth there is to it. But there’s no doubt that the job market is weak and that age discrimination, which is not against the law in China, is prevalent. That is a double whammy for workers in their mid-30s who are making big decisions about career, marriage and children.

“Too old to work at 35 and too young to retire at 60,” said a viral online post — meaning that people of prime working age lack prospects and older people may need to keep working as the government is considering raising the retirement age. The post goes on: “Stay away from homeownership, marriage, children, car ownership, traffic and drugs, and you’ll own happiness, freedom and time.”

Mr. Liang has since moved from Guangzhou in southern China back to his home village because he couldn’t afford his rent of less than $100 a month. He’s not married; neither are three of his cousins, all around his age. He said only people with stable jobs, such as government workers and teachers, could afford to start a family.

Growing competition in the job market is one reason young Chinese are delaying marriages, an official with the national health commission, which oversees demographic policies, was quoted as saying by the Chinese news media last year.

It’s hard to trust employment data from the Chinese government, which counts anyone who has worked one hour a week. That low bar has kept the urban unemployment rate at a little over 5 percent for much of this year, better than in 2019.

Numbers from the corporate world tell a different story. In the first three months of this year, Alibaba, Tencent and Baidu, among the country’s biggest internet companies and best-paying employers, hired about 9 percent fewer workers than they did during their hiring peak in the pandemic, according to their financial reports. Some of China’s biggest real estate developers cut their head counts by 30, 50 or even 70 percent in 2022.

“The next few years will be the most challenging time for employment since the reform and opening up” in the late 1970s, Wang Mingyuan, an economist in Beijing, wrote in a widely circulated article. He noted that around 50 million people ages 16 to 40 could be unemployed by 2028, adding, “It could trigger a series of deeper crises.”

In 2022, the number of marriage registrations fell 10.5 percent from a year earlier, to the lowest number since China began disclosing the data in 1986. The country’s birthrate fell to a low point last year, and its population shrank for the first time since 1961, the end of the Great Famine.

Age discrimination affects all older workers, but people in their mid-30s may feel it most acutely because they are experiencing it for the first time.

Flynn Fan started dreading 35 when he was 30. He knew he might be passed over for work in a few years, but until then his problem was overwork.

At his last company, he said, most of his colleagues were either single, like him, or married without children. Their overtime shifts were out of control. For three months in 2021, Mr. Fan said, the earliest he left work was 11 p.m. He started taking anti-anxiety drugs.

Then late last year he was let go, along with most of his colleagues, at an artificial intelligence company in Shanghai.

In the past six months, he has sent his résumé to more than 300 companies and landed 10 interviews with no offer. Now he is looking for jobs that pay 20 to 30 percent less. He also started looking in other cities near Shanghai.

At 35, he feels young. But for society, he said, 35 is like a “plague.”

Cici Zhang is 32 and has already been told by employers that she’s too old. She showed a screenshot of a job posting at a company that sells maternity products, with the age limit set below 32. One of her former supervisors told her that he could replace her with a young graduate after three months of training.

Chinese companies like to chase the hottest trend instead of perfecting what they already have, she said. So experience and expertise aren’t the qualities they value most.‌

As a woman, Ms. Zhang faces added layers of discrimination. Since she was 25, she has fielded questions from employers about when she planned to have children. When she answered that she and her husband had no such plans, she would be asked what their parents thought of their decision.

After being laid off in September, Ms. Zhang, a marketing professional, messaged more than 3,000 companies, sent her résumé to more than 300 and landed fewer than 10 interviews. Last month, she finally got a job offer from a small company.

She accepted the job, feeling no excitement or happiness about it.

“I used to have expectations. I wanted promotions, pay raises and a better life,” she said. “Now I have none. I just want to survive.”

She and her husband feel they can’t afford to have children. They have a mortgage and barely scraped by when she was out of work, while worrying that he, too, could lose his job.

Their anxieties make them wonder whether it’s even fair to have children. Ms. Zhang quoted a popular saying on the internet: “If a child’s birth is meant to inherit one’s toil, panic and poverty, then not giving birth is also a form of kindness.”

Mr. Liang, the 38-year-old tech professional, said something similar. He loves children but doesn’t believe he could give them a good life. Like many Chinese who grew up in the countryside, he was raised by his grandparents while his parents worked in cities. He would not want his children to have that life.

Besides, he first has to find a job. Even before the pandemic, he was asked at an interview why he was applying for a tech support position at his age. He showed me the job listings of his local provincial government: The age requirement for all positions was 18 to 35.

When I commented that 35 must weigh like a mountain, Mr. Liang responded, “It’s the precipice.”