After years of hiding, Japan's blue-eyed dolls came out of the closet yesterday.

A group of 31 dolls - their dresses frayed and their skin darkened with age - went on display as part of Japan's commemoration of the end of World War II.

The blue-eyed dolls are among perhaps 100 survivors of more than 12,000 sent to Japan by Americans in 1927 as a gesture of international frienship and good will.

At first accorded places of honor in primary schools and kindergartens throughout the country, the dolls fell victim to wartime purges.Schools were pressured by military organizations to destory them as an exorcism of the American enemy's spirit.

Some were buried in schoolyards. All disappeared gradually from public view. The survivors, treasured by their owners, were hidden away in attics, or concealed in storage boxes in closets.

It was a risky business. One was given bya school principal to a friend with a letter of instruction to "hide this prisoner."

Five years ago, Ayako Ishimaru discovered that one of the dolls had resurfaced in a school in north-central Japan. Struck by the doll's survival "through such harsh times," she attempted to track down the original donor, a man who lived in Rochester, N.Y. He had died.

Ishimaru did a little homework and found that of about 100 dolls sent to her prefecture in 1927, only three had survived. Last year, she sponsored a ceremony of consolation. The publicity attracted attention throughout Japan and the dolls began popping up all around the countryside.

Yesterday marked their formal re-emergence as the 31 went on display. During a brief ceremony, the wife of Foreign Minister Sunao Sonoda recalled that her school once owned one.

Later, Aiyoshi Kawabata, a professor emeritus of Kyodo University and a doll hobbyist who helped organize the event, recalled in an interview the days when the dolls disappeared.

During the war, he said, the hostility toward Americans became very strong. It is not true, as some reports have had it, that the doll-purging orders came from high military sources, he said. Rather, it was local pressure from military groups and organizations of retired soldiers that forced the schools to get rid of them.

The dolls were widely admired and were given places of honor in the schools. Kawabata recalled, and the authorities feared that such affection interfered with the effort to picture Americans as enemies. So the schools were required to destroy them.

Those which escaped destruction were hidden away in dark places between ceilings and roofs or in storage boxes where they were covered over with other memorabilia, he said.

Most of the recovered dolls have been turned up in rural areas. The reason is that those whcih had been preserved in the cities were destroyed by the American bombing raid, Kawabata explained.

The dolls came to Japan accompanied by tags identifying the donors with such names as the "San Mateo, Calif., Blue Jay Club" or the "Committee on World Friendship Among Children." According to the available records, 12,739 dolls were sent to Japan under the auspices of an organization called "Doll Messengers of Friendship."

Mitsukoshi department store, which sponsored the resurrection ceremony, plans to market copies of the original blue-eyed dolls and the first ones went on sale yesterday, priced from $54 to $444.

Japan also commenorated the end of World War II yesterday in a variety of other ways.

In a large Tokyo hall, Emperior Hirohito offended tribute to the 3.1 million Japanese who died in the war, that ended in surrender 33 years ago.

Prime Minsiter Takeo Fukuda bowed his head at the Yasukuni shrine to the memory of the military dead. And an old, reconditioned Zero fighter plane was flown from a defense base.

But the most poignant scene for an Americn was the re-emergency of the blue-eyed dolls, reviving memories of a half-century old goodwill mission that turned, literally, to ashes in the fever of wartime Japan.