SHANGHAI — Ordering illegal drugs from China is as easy as typing on a keyboard.


On guidechem.com, more than 150 Chinese companies sell alpha-PVP, also known as flakka, a dangerous stimulant that is illegal in the United States but not in China, and was blamed for 18 recent deaths in one Florida county.


The e-commerce portal Qinjiayuan sells air-conditioners, trampolines and a banned hallucinogen known as spice, which set off a devastating spike in United States emergency room visits in April.


The stimulant mephedrone, sometimes sold as “bath salts,” is banned in China but readily for sale at the Nanjing Takanobu Chemical Company for about $1,400 a pound.


“I can handle this for you legally or illegally,” a company salesman said by phone when asked about shipping the product overseas from the company’s headquarters in coastal Jiangsu Province. “How much do you want?”


In a country that has perfected the art of Internet censorship, the open online drug market is just the most blatant example of what international law enforcement officials say is China’s reluctance to take action as it has emerged as a major player in the global supply chain for synthetic drugs.


While China says it has made thousands of arrests and “joined hands” with foreign law enforcement agencies, officials from several countries say Chinese authorities have shown little interest in seriously combating what they see as the drug problems of other countries.


“They just didn’t see what was in it for them to look into their own industries exporting these chemicals,” said Jorge Guajardo, the former Mexican ambassador to China.


China’s chemical factories and drug traffickers have exploited this opportunity, turning the nation into a leading producer and exporter of synthetic drugs, including methamphetamine, as well as the compounds used to manufacture them, according to seizure and trafficking route data compiled by American and international law enforcement agencies.


China is now the source of a majority of the ingredients needed to manufacture methamphetamine by Mexican drug traffickers, who produce 90 percent of the meth consumed in the United States, according to the Drug Enforcement Administration.


As governments around the world have stepped up regulation of these so-called precursor chemicals, the Mexican cartels have increasingly turned to Chinese chemical factories.


Mr. Guajardo, Mexico’s ambassador from 2007 to 2013, said his efforts to persuade Chinese authorities to restrict the export of these chemicals, which are banned in Mexico, came to naught. Instead, he said, Chinese officials said the problem was best handled by Mexican customs agents or claimed that Mexico’s written requests for assistance had used the incorrect typeface or were improperly translated into Chinese.


“In all my time there, the Chinese never showed any willingness to cooperate on stemming the flow of precursors into Mexico,” he said in a telephone interview.


At the same time, clandestine Chinese labs manufacture and export their own meth and other synthetic drugs around the world. In 2013, the police dismantled nearly 390 meth labs in China, more than in any other country in the region, according to a United Nations report released in May.


These manufacturers have flourished in part because the country’s huge chemical industry is weakly regulated and poorly monitored, officials say, making it easy for criminal syndicates to divert chemicals with legitimate uses in making medicine, fertilizer and pesticides into the production of new and dangerous drugs.


The labs have also figured out how to stay one step ahead of laws banning illicit synthetic drugs simply by tweaking a few molecules, creating new and not-yet-illegal drugs.


Since 2008, the number of new psychoactive substances reported to the United Nations Office on Drugs and Crime has soared more than eightfold to 541, far outpacing the 244 drugs controlled under global conventions. Often sold as “legal highs” and “research chemicals,” these drugs are designed specifically to exploit an outdated international legal framework.


Some countries, including the United States, have banned whole ranges of chemicals that mimic illegal drugs, but many nations do not. The European Union in particular, with its open borders and disparate drug laws, provides ample opportunity for smuggling contraband.


“Drug traffickers take advantage of this,” said Soren Pedersen, a spokesman for the European police agency Europol. “As soon as a substance becomes illegal in Germany, they can just divert it to Denmark, Sweden or Austria.”


Several American officials said China was the primary source for new synthetic drugs.


“Hands down China is No. 1,” said a federal law enforcement official, who was not authorized to speak publicly.


“I know prosecutors in Arizona, Virginia, Minnesota,” said Carla Freedman, an assistant district attorney in New York who in 2013 prosecuted a ring trafficking drugs from Shanghai. “We’re seeing cases nationwide and ground zero always seems to be China.”


According to the Australian Crime Commission’s latest Illicit Drugs Report, released last month, China was the primary source of illicit amphetamine-type drugs detected at the Australian border in 2013 to 2014.


In 2013, the Australian police made their largest methamphetamine seizure ever, 1,300 pounds discovered in a shipping container from China with a street value of $450 million. Since then, Australian authorities have found meth in Chinese shipments of garden hoses, handbags, lamps, aquarium pebbles, metal shafts, kayaks and 70 porcelain toilets.


“We’ve seen it all,” said Detective Superintendent Scott Cook, who commands the Organized Crime Squad in the state of New South Wales, which includes Sydney. “There’s absolutely no limit in terms of how far they go to import drugs. They’re ingenious.”


Chinese officials say the government is committed to international cooperation against drug traffickers.


“We aim to help and support other countries in any way we can,” Liu Yuejin, the assistant minister of public security, has said publicly.


In response to faxed questions, the Chinese Foreign Ministry denied any problems in law enforcement cooperation with Mexico.


But Hao Wei, a member of the ministry’s Committee for Prevention of Synthetic Drug Abuse, said traffickers would always find loopholes.


“I really don’t think only governments should be blamed for this,” he said in a telephone interview. “Instead of pointing fingers at each other, we should confront the problem and deal with it in a comprehensive and balanced way.”


China has responded to mounting international pressure with several high-profile busts. In April, officials announced the arrest of more than 133,000 people and seizure of 43 tons of illegal narcotics during a five-month antidrug sweep that ended in March.


But experts say these actions have failed to significantly impede traffickers. “China likes everyone to think they’re in control of everything,” said a United Nations official, who asked not to be identified to avoid political repercussions. ”But at the end of the day they have an enormous chemical industry and the state doesn’t have the capacity to monitor and control it.”


The United States said in a report last year that China was taking steps to join global efforts against illegal drugs but added that those efforts are “hindered by cumbersome internal approval processes” that limit the ability of American investigators to work with their Chinese counterparts. In March, the Drug Enforcement Administration resorted to an elaborate ruse to lure one of the world’s top synthetic drug manufacturers, a Chinese citizen named Tian Haijun, to Los Angeles to arrest him.


Even when China does make an arrest, it may not accomplish much.


For more than a decade, Zhang Lei, a 39-year-old Shanghai chemist, also known as Eric Chang, manufactured thousands of pounds of synthetic drugs for buyers in 57 countries, earning about $30 million from shipments to the United States alone, American officials say. In Britain he was known for producing substances consumed by young ravers. The Australian police accused him of shipping ingredients for crystal meth to an artist in Melbourne.


Though wanted by Interpol since 2011, Mr. Zhang made little effort to conceal his identity or the nature of his work. He handed out business cards with his real name, address and phone number. A photo of crystalline white powder adorns a Twitter page with his name that links to his company website. To stay ahead of local and international laws banning new synthetic drugs, his company, China Enriching Chemistry, constantly developed new chemical variations for export, American officials said.


The company’s website, for instance, advertises a substance called “Eric-2,” a substitute for mephedrone that costs $1,500 for 100 grams, or 3.5 ounces.


“It falls outside all illegal laws currently regarding research chemicals,” the website boasts in slightly flawed English.


The Chinese police knew about Mr. Zhang for years, and finally arrested him in 2013 on charges of producing ecstasy.


Last July, the United States Treasury Department sanctioned Mr. Zhang, his company and three associates under the Foreign Narcotics Kingpin Designation Act, which froze their American assets.


Yet Mr. Zhang’s company is still thriving.


The company’s Shanghai headquarters remains open, and its English-language website, a veritable Amazon of synthetic highs, promises three-day international delivery and full refunds if customs officials seize any shipments.


The Ministry of Public Security did not respond to faxed questions about the status of Mr. Zhang’s case or the continued operation of his drug business.


On a recent visit to the company’s headquarters in a drab office park here, Mr. Zhang’s mother, Wang Guoying, 65, whose assets in the United States have been frozen, sat at a large wooden desk. Photos of Mr. Zhang and his son were displayed on a nearby bookshelf next to glass beakers and bottles of champagne and Glenfiddich Scotch.


Although a product brochure in the office listed mephedrone, Ms. Wang denied that the company ever sold illegal drugs.


“What American buyers did with the chemicals they bought from my son can’t be blamed on him,” she said. “We’re a legitimate company. If we weren’t would we still be up and running?”