BEIJING -- China plans to require that all personal computers sold in the country as of July 1 be shipped with software that blocks access to certain Web sites, a move that could give government censors unprecedented control over how Chinese users access the Internet.

The government, which has told global PC makers of the requirement but has yet to announce it to the public, says the effort is aimed at protecting young people from "harmful" content. The primary target is pornography, says the main developer of the software, a company that has ties to China's security ministry and military.

China's Ministry of Industry and Information Technology didn't respond to requests for comment.

The Chinese government has a history of censoring a broad range of Web content. The new requirement could force PC manufacturers to choose between refusing a government order in a major market or opening themselves to charges of abetting censorship.

The software needn't be preinstalled on each new PC -- it may instead be shipped on a compact disc -- giving users some choice. But if installed, foreign industry officials who have examined the software say, it could transmit personal information, cause PCs to malfunction, and make them more vulnerable to hacking. It also makes it difficult for users to tell what exactly is being blocked, officials say.

A spokeswoman for Hewlett-Packard Co. HPQ 1.45% , which has the largest PC market share of any U.S. vendor in China, said the company is "working with the government authorities and evaluating the best way to approach this. Obviously we will focus on delivering the best customer experience while ensuring that we meet necessary regulatory requirements."

Susan Stevenson, spokeswoman for the U.S. Embassy in Beijing, said the embassy was studying the new rule to assess its impact. "We would view any attempt to restrict the free flow of information with great concern and as incompatible with China's aspirations to build a modern, information-based economy and society," she said.

The software's Chinese name is "Green Dam-Youth Escort." The word "green" in Chinese is used to describe Web-surfing free from pornography and other illicit content. Green Dam would link PCs with a regularly updated database of banned sites and block access to those addresses, according to an official who tested the product for a government agency.

The May 19 Chinese government notice about the requirement says it is aimed at "constructing a green, healthy, and harmonious Internet environment, and preventing harmful information on the Internet from influencing and poisoning young people."

The software was developed by Jinhui Computer System Engineering Co., with input from Beijing Dazheng Human Language Technology Academy Co.

Bryan Zhang, founder of Jinhui, said Green Dam operates similarly to software designed outside China to let parents block access to Web content inappropriate for children. Some computers sold in China already come with parental-control software, but it isn't government-mandated.

Mr. Zhang said his company compiles and maintains the list of blocked sites, which he says is limited to pornography sites. He said the software would allow the blocking of other types of content, as well as the collection of private user data, but that Jinhui would have no reason to do so. He also said the software can be turned off or uninstalled.

His company plans to transmit new banned addresses to users' PCs through an Internet update system similar to that used by operating-system software and antivirus programs.

The software requirement was outlined in a notice that was issued by China's Ministry of Industry and Information Technology on May 19 but that hasn't yet been publicized by state media. The notice, a copy of which was seen by The Wall Street Journal, says PC makers must ship PCs to be sold in China as of July 1 with the Green Dam software "preloaded" -- pre-installed or enclosed on a CD.

The notice says PC producers will be required to report to the government how many PCs they have shipped with the software. The notice doesn't mention any punitive action for noncompliance.

Sales of PCs in China neared 40 million units last year, second only to the U.S. Chinese company Lenovo Group Ltd. had the largest market share, with 26.7% of units shipped in the first three months of 2009, while H-P had 13.7% and Dell Inc. DELL -0.99% had 8.1%, according to research firm IDC.

Manufacturers have more than just sales in China to consider when the government asks them to do something: Major PC companies also have investments in factories and research facilities in China.

Dell declined to comment on the software. Lenovo said, "We review all legislation relating to our business," and didn't comment further.

Foreign industry officials say companies have been given little time to properly test Green Dam. "The lack of transparency, the shortness of time for implementation, and the incredible scope of the requirement that is not matched anywhere around the world present tremendous challenges to the industry," said an industry official who has discussed the plans with several major PC makers.

China already operates an extensive Internet filtering system, commonly called the Great Firewall, which blocks access to a range of content, from pornography to politically sensitive sites. Such sites have included those promoting Tibetan independence and the spiritual group Falun Gong; in specific circumstances the government has blocked access to foreign media sites.

But that system blocks content at the network level, and many users circumvent it. The new method could give the government a way to tighten its control, say foreign industry officials who have examined the software.

Having one universal application that opens a link into every computer could also make those computers more vulnerable to cyber attacks. Mr. Zhang said that the software is no riskier than other programs that are updated periodically through the Internet.

Moreover, Green Dam, which is designed to work with Microsoft Corp.'s Windows operating system, could also conflict with other applications, causing glitches or even system crashes, industry officials said.

Wu Weiwei, an official from the government's China Software Testing Center who oversaw testing of the software, said extensive tests of the software have shown no problems.

U.S. Internet companies have for years grappled with demands from the Chinese government to censor content or share potentially private data with police.

Several of the biggest -- including Google Inc., Yahoo Inc. and Microsoft MSFT 1.79% -- joined together last October to announce a set of guidelines for how they would comply with censorship requests from countries such as China, including a promise to be transparent about the requests they receive. But the effort, known as the Global Network Initiative, was criticized by some civil-liberties groups as being short on specifics and not doing enough to fight censorship laws. No computer hardware makers are members of the group.

A Yahoo spokeswoman said that the company would "continue to analyze international developments that may impact our industry." "We strongly support the free flow of information and the right to freedom of expression," she said.

Jinhui's Web site said it has a long-term "strategic cooperative partnership" with a research institute of the Ministry of Public Security on image-recognition technology, as well as long-term "technical cooperation" with the People's Liberation Army's Information Engineering University.

Mr. Zhang said Jinhui has only worked with the Ministry of Public Security on issues concerning pornography.

The Web site of Dazheng, the other software company involved in developing Green Dam, says the company works with the Armored Engineering Institute of the People's Liberation Army, and that it helped the PLA in 2005 produce a system to intercept "confidential" documents.

Wang Jingcheng, deputy general manager of Dazheng, said the Ministry of Industry and Information Technology has "strict regulations and forbids all software companies from collecting any personal information." He added that the software will block content "according to the law."

—Kersten Zhang, Justin Scheck and Nick Wingfield contributed to this article.

Write to Loretta Chao at loretta.chao@wsj.com