Nestle Co., world's largest manufacturer of infant formula, announced yesterday that it will comply with the tough international marketing rules advocated by Third World countries and adopted by the World Health Organization last May.

Until now, Nestle has endorsed the "principle" of the WHO code, but has refused to abide strictly by it.

Critics complain that the marketing practices of Nestle and other companies have caused many mothers around the world to switch from breast to bottle feeding despite the cost and possible danger to infants' health.

To combat the manufacturers' push to substitute costly formula for breast milk, the United Nations adopted the voluntary code by a 118-to-1 vote, with the United States the only dissenter. The code was backed by Third World nations which argued that unsanitary conditions, contaminated milk and water and the ignorance of many illiterate parents in their countries made formula a potential health hazard.

Nestle products, including coffee, chocolates and Stouffer's food, are the target of a boycott by about 75 unions, church groups and health organizations.

In yesterday's announcement, Nestle said it would abide by laws or policies established by each of the 120 countries where they sell formula. But more than half of those countries have no laws or policies, and in those countries Nestle will now abide by the WHO code, as it is interpreted by the company.

Some key provisions of the code include a ban on all advertising and on providing sample cans of formula, directly or indirectly, to mothers. Sales and marketing people for formula companies are banned from contact with mothers.

Nestle also will begin sending material to health workers saying that "breast feeding is best for babies. Mothers should always seek medical advice before introducing" formula into an infant's diet.

"We welcome the Nestle initiative," said Douglas Johnson, head of the Infant Formula Action Coalition (Infact), the group which has led the boycott. "We will judge the sincerity of it on the willingness of Nestle to meet with the International Nestle Boycott Committee."

Rafael D. Pagan, president of the Nestle Coordination Center for Nutrition in Washington, indicated that Nestle will continue to refuse to meet with the boycott committee. He said he could not see any effect of the boycott in Nestle sales.

He said probably the most costly change will be to eliminate from labels the idealized pictures of mothers and infants, except where countries "require" such pictures for less literate mothers.

Nestle officials say the company has a third of the world's $1.4 billion infant formula market, even though it sells no formula in the United States, the largest national market.