Undated (AP) _ World leaders today welcomed Corazon Aquino to their ranks, praising her for inspiring an almost bloodless revolt that broke Ferdinand E. Marcos' tenacious 20-year rule of the Philippines.

In Ottawa, Canadian Prime Minister Brian Mulroney sent a message of congratulations to Mrs. Aquino, calling her an ''inspiration for the world.'' Mulroney's message, sent through Canada's embassy in Manila, lauded Mrs. Aquino's ''courage, determination, political vision and commitment to democratic principles'' in the battle to topple Marcos.

Marcos relinquished power Tuesday in the face of mounting domestic and foreign pressure. Both he and Mrs. Aquino had claimed victory after the Feb. 7 election that was marked by charges of widespread electoral fraud by Marcos supporters.

Australian Prime Minister Bob Hawke paid tribute to the ''magnificent resolve of the millions of Filipinos who, through their commitment to democracy and to fairness and justice in the conduct of your country's affairs, managed to secure the victory that was properly theirs.''

He said the Australian foreign minister, Bill Hayden, planned to visit Manila in the next few days to establish high-level contact with the new government.

In Tokyo, Foreign Minister Shintaro Abe said, ''The government of Japan is pleased that ... the recent tense stand-off in the Philippines has been resolved peacefully without the tragedy of bloodshed.''

Abe said in a statement, ''The government of Japan is hopeful that the people of the Philippines will unite behind the new government led by President Aquino and move ahead with the task of nation-building.''

The Singapore government issued a statement saying: ''President Corazon Aquino and the Filipino people can take pride in overcoming a grave political crisis in a manner that does credit to democracy.''

However, while most of the world's governments welcomed the change of power in the Philippines, East bloc nations largely ignored it.

The Soviet news agency Tass and Radio Moscow briefly reported Marcos' departure but without comment. The Soviet Union was the only government to congratulate Marcos on winning the Feb. 7 election.

Poland's state radio also announced Marcos' loss of office without comment.

Yugoslavia's official Tanjug news agency said: ''Washington has pulled the strings in such a fashion the last couple of months so that it was clear that there was no help for Marcos.''

In Managua, Nicaraguan President Daniel Ortega on Tuesday expressed the ''joy of Nicaragua'' over the fall of Marcos' government.

In a message to Mrs. Aquino, Ortega said: ''Nicaragua is sure that in the new Philippines the people's aspirations for democracy, independence and social justice will continue to triumph over the forces of backwardness and foreign dependence.'' Europe also welcomed the change.

French Prime Minister Laurent Fabius said Tuesday that his country ''is at the side of all people who struggle, at the side of Philippine democrats, at the side of Cory Aquino. In the name of France, we condemn, as we have always done, dictatorship in any form and in particular when it takes a form called Marcos.''

In The Hague, the foreign ministers of the 12-nation European Common Market congratulated Mrs. Aquino ''for her consistent stand in defense of democratic principles.''

Juergen Moellemann, a senior West German Foreign Ministry official, called Marco's decision to step down ''a contribution to a bloodless solution of the Philippine crisis.''

Austrian President Rudolf Kirchschlaeger sent a congratulatory message to Mrs. Aquino saying in part: ''I am confident that the Philippine people under your leadership will resolutely follow the way to a peaceful, democratic and happy future.''

British Prime Minister Margaret Thatcher, speaking in the House of Commons, noted that the United States had recognized Mrs. Aquino as president and said, ''We will wish her well.''

In India, a statement from the External Affairs Ministry said, ''Mrs. Aquino ... has consistently stood for a peaceful and non-violent solution of the situation in the Philippines. India has always stood in favor of democratic principles and respect for the will of the people.''