It ain't visibly broke, but the Japanese government has its tools out to fix the venerable Nippon Telegraph and Telephone Public Corp., now the largest phone company in the world.

Legislators are expected to strip the $19-billion-a-year operation of its monopoly over domestic telecommunications later this year, permitting other companies to offer services and opening the equipment field to more suppliers.

Since its inception in 1952, NTT has held almost sacred rights to every word phoned and every data bit transmitted in Japan. What is planned could mean a revolution in Japanese telecommunications as far-reaching as the divestiture of American Telephone & Telegraph Co.

Foreign companies already have put their salespeople on the streets in the hope that the change will bring them billions of dollars worth of new business. But they fear that, by gentleman's agreement, the Japanese will reserve the best for themselves.

U.S. officials here are concerned over the future of an agreement signed with Japan in 1980 guaranteeing foreign companies equality in NTT bidding. Japanese officials have said that the agreement will end when NTT goes private; the United States says that the agreement, or something like it, should remain.

The U.S. Embassy here also has criticized the government's decision to have new equipment tested by an association composed of NTT and Japanese suppliers, with no foreign members. The suggestion is that such a body cannot make an objective evaluation of American products.

Japanese officials scoff at these fears. Yet in the foreign business community here, it is hard to find an outright optimist.

For years, NTT's $3 billion worth of annual procurement orders have been dominated by the so-called Den Den family, about 20 Japanese companies that share the fruits of their research laboratories. There are fears that these companies will control orders from the new ventures as well.

With Japanese companies grabbing huge market shares in the United States since the AT&T divestiture, many U.S. policy makers have demanded equal access for U.S. companies here. The Japanese say they will have equal access, provided they can match price and quality of the locals.

From the ashes of war, NTT built a highly reliable phone network that today extends into every corner of Japan. The country has 44 million subscriber lines, second only to the United States; calls always go through.

Despite these accomplishments, NTT has been faulted on innovation, service and attentiveness to customers. Repair crews can take days to respond to a complaint; the Tokyo telephone book is widely dismissed as unusable.

Critics contend that the government-owned company has grown fat on monopoly and lacks the mettle to lead Japan into the new data communications age. "NTT did a good job giving us telephones," said Norio Nakamura, an economist at the Federation of Economic Organizations. "But that job is finished."

By opening the field, advocates hope both to inject a new fighting spirit into NTT and its 320,000 employes and to nuture a family of smaller but aggressive competitors.

Already, rival groups are forming to discuss microwave and optical fiber lines between Tokyo and Osaka, computer switching networks to allow incompatible machines to talk to one another by phone (known here as Value Added Networks, or VANs), and independent satellite systems.

Officials hope that the long-run effects will be lower costs to users, speedier introduction of data transmission services and an even keener competitive edge for Japanese equipment manufacturers in world markets.

The goals are remarkably similar to those behind the dismantling of AT&T, which formerly held the world record for size. A common theme runs through both cases: new technology that lowered capital costs and helped undermine the rationale for monopolies in the copper wire days, and prevention of duplicate investment.

Deregulation in the United States came in fits and starts and was largely the work of courts. Here, it will come in a patiently designed package, the result of years of consultation among government, industry and NTT itself.

As in the United States, consumers here will be free to shop around for their own phones and accessories. There is also familiar talk of whether long-distance rates subsidize local ones and should be adjusted.

The industry here will remain closely regulated by the Ministry of Posts and Telecommunications, but with a new set of rules. The Japanese want to avoid the type of free-for-all that erupted in the United States -- and, incidentally, allowed Japanese suppliers to grab a huge segment of the market.

A free-for-all "does not sit well with the Japanese mind," said J. P. Stern, Tokyo senior representative of the American Electronics Association. "Too many people get hurt."

With phone installation rates and the popularity of telegrams declining, NTT's profitability began to sink in the late 1970s. But by force of scale, it remains an important money-maker for the government, earning $1.3 billion in fiscal 1983.

In the 1970s, as the United States pulled further ahead in telecommunications, government bureaucrats charged with studying Japan's future competitiveness began wondering if the NTT monopoly had not outlived its usefulness.

After exhaustive debate, consensus emerged in favor of deregulation. It was reflected in a weighty report issued in 1982 by a study group called the Second Ad Hoc Commission on Administrative Reform.

The Diet, or national legislature, adjourned in August without completing action on three bills designed to end the monopoly and, despite its profitability, to sell the company off in blocks to the private sector.

NTT's union, fighting for the right to strike, linked up with the opposition Japan Socialist Party, which questioned the effect that selling the company would have on rates. And some members of Prime Minister Yasuhiro Nakasone's own ruling Liberal Democratic Party wondered about dumping something that works as well as NTT does.

Still, the legislation is widely expected to be passed next month, with the changes to be effective next April 1.

At NTT's headquarters building across from the Imperial Palace in Tokyo, executives say it is all for the better. Their forward-looking stance is partly attributable to NTT's aggressive president, Hisashi Shinto, who came from the private sector in 1981 and has become one of the plan's most vocal proponents.

NTT already is spending big for the competitive future. It has begun an enormous effort to standardize and digitalize telephone, telex, telegram, facsimile and data transmission systems. The total cost over the next 15 years has been estimated at $100 billion.

A multifaceted Information Network System that will include such features as teleconferencing is scheduled to be available in Japan's major cities in 1985 and everywhere else by the summer of 1988.

Long-distance optical fiber lines are now being laid across Japan's four main islands.

Preparation for April is proceeding on the outside, too. Last May, 25 companies set up a joint venture named Dainidenden -- literally, ""Second NTT"." Since then, 100 more companies have put in capital, which now totals $32 million.

It will leave local calls to NTT. Its interest for now is the country's most lucrative long-distance communications corridor, the great industrial belt between Tokyo and Osaka. It is planning a microwave relay system similar to MCI Communication Corp.'s in America.

""We will obtain the same quality as NTT without so many human hands,"" said its executive vice president, Hajime Nakayama. Despite capital costs in the $120 million to $160 million range, he sayssaid the group thinks it can beat NTT's long-distance charges by between 20 percent and 30 percent.

Other groups have formed around the Japanese National Railways, another public corporation, and the government's Ministry of Construction. Both own rail or highway rights-of-way through the industrial belt, along which optical fiber lines could be laid.

Hughes Aircraft, meanwhile, has discussed satellites with Second NTT. Although Japan has limited use for satellites because of its size and extensive system of ground cables, one selling point is that satellites are unaffected by Japan's frequent earthquakes.

The second promising field of promise is the computer-switching setup, or Value Added Network.

Japan was quick to computerize communications within single companies. The national railways, for instance, installed an on-line reservations system in the early 1960s. But partially because of to objections of interference with phones, the country has lagged in linking computers at separate companies.

Several years ago, NTT began offering limited services to link incompatible computers in different companies. Last year, it loosened up a bit more to allow other operators to enter the business, but only if the clients were only small or medium-sized enterprises. As of April 1, these limits would come off.

The foreign role in the long-distance networks probably will be in supply, not ownership. But with VANs, U.S. companies plan to operate systems themselves. International Business Machines Corp. is planning a wholly owned system. AT&T, meanwhile, is reportedly is teaming up with such giants as Toyota and Sony for a joint venture. ""We're strong in technology, we're weak in distribution,"" notes noted John W. Cusick, managing director of AT&T International (Japan).

Like many other people here, Cusick sees virtually unlimited possibilities in an economy as strong as Japan's. Banks are expected to jump at VANs. They also could be used to link supermarkets to wholesalers and auto factories to dealers.

U.S. companies will not find their experience at home immediately transferable, however. As NTT's VAN specialist in VANs, Mineo Misumi, points out, foreign-made software must be adjusted for Japan's bookkeeping methods, display screens for its huge money numbers and manuals for Japanese cultural attitudes.

Despite misgivings, however, few people in the foreign business community who would keep NTT as it is. They consider deregulation is the best thing they've seen in Japan in years.