DESPITE THE SPECTACULAR increase in the value of the Japanese yen - almost 40 percent in the past 18 months - Japan continues to run an enormous trade surplus with the rest of the world.

In June it was nearly $3 billion - creating a major problem for the rest of the world that the economic summit in Bonn failed to resolve. Prime Minister Takeo Fukuda promised only that "extraordinary measures" would be taken to keep the surpluses from rising higher than last year.

U.S. Special Trade Representative Robert Strauss is struggling to get Japan to lower its tariffs and nontariff barriers on industrial and agricultural items. He has wrung promises from Japanese leaders that exports of cars, steel, and TV sets will be held back voluntarily.

But even if such promises can be kept, all they mean is that Japanese surpluses will continue to be massive. That assures a rising tide of protectionism.

"It goes against the grain," sighs a well-known ex-diplomat who built a reputation as a free-trader, "but I think we're going to have to impose some kind of quotas or surcharge on the Japanese."

That's dangerous talk, and so far - to its credit - the Carter administration hasn't given in to such pressure, although there is plenty of it on Capitol Hill. In a letter to Ohio Rep. Charles Vanik Aug.9, Strauss said that a surcharge is not the answer to U.S. trade problems with Japan.

Unhappily, Strauss left the door slightly ajar, saying that, although he would not recommend a surcharge now, "I recognize that it provides alegitimate option. . . which might prove useful under different circumstances."

WHITE HOUSE OFFICIALS, even in a desperate search this past week for some answers to the slide of the dollar, promised that an import surcharge would be "a last resort," something used "only if the dollar fell like a rock."

They recognize that it not only would invite retaliation, but would add significantly to inflation - already aggravated by the depreciation of the dollar. Even the informal quotas in effect through orderly marketing agreements and other arrangements have worsened inflation.

U.S. manufacturers of color TVs, with less competition from Japan, recently boosted prices by $50. U.S. auto manufactureres also raised prices, negating part of the advantage they get from higher Japanese car prices forced by the appreciating Japanese yen.

The Japanese, of course, are concerned by new talk of an import surcharge. Their Finance Ministry official, Michiya Matsukawa, made the rounds in Washington and New York last week - assuring one and all that the peak of the trade surplus had been hit in June.

That may be true. It even logical, given the enormous appreciation of the yen. But Japanese trade surplus forecasts have been notoriously inaccurate. Until the surplus starts declining, businessmen and politicians here will be skeptical.

WHAT IS IMPORTANT for Japan to do is make changes in troublesome rules and regulations that discourage or bar imports.What is important for Americans to realize is that the process takes time. No one should expect Fukuda to wave a wand and direct Japanese importers and exporters to do precisely what he wants. Japan is, after all, a democracy. Not precisely like ours, but still a deomocracy.

Fukuda has about as much control over the Japanese farm lobby, which shrieks about the imports of citrus and beef, as Mr. Carter has over the U.S. Congress, which won't give him the energy legislation he wants.

It is important for influential legislators like Vanik to remember that part of the Japanese success in selling goods here has been an ability to supply consumers with the quality products they demand. For some of these, there is not even an equivalent American product on the market.

Altogether, this is a difficult situation that calls for a calm, statesmanlike approach by both government and business officials on both sides. An import surcharge would be a repeat of Nixon's dreadful mistakes of 1971. But Japanese businessmen need to accept more competition from abroad to assure that such a mistake won't be made.