UNITED NATIONS (AP) _ The Soviet's top U.N. official says Secretary-General Javier Perez de Cuellar is sympathetic to his country's protest of a U.S. order that the Soviets reduce their staff at the United Nations.

''He's worried. He understands our position,'' acting Ambassador Vasily Safranchuk said Tuesday.

The Soviets filed a formal protest Tuesday, calling the American order to reduce the Soviet's U.N. staff from 275 to 170 by April 1, 1988 an ''illegitimate demand,'' and Safranchuk said he asked Perez de Cuellar for his heldp.

The Soviets say there is ''nothing in the existing international agreements'' giving the United States the right to restrict the staffs of the diplomatic missions to the United Nations.

The United States order Friday called the number of employees of the Soviet mission ''unreasonably high'' and said that posed ''a threat to U.S. national security''

U.N. spokesman Francois Giuliani said Perez de Cuellar had made suggestions to both Safranchuk and an American delegate.

He declined to give details, but said the U.N. legal department had prepared a position paper for Perez de Cuellar based on provisions of the agreement between the United Nations and the United States regarding the U.N. headquarters in New York.

The agreement describes legitimate representatives at the U.N. missions as ''such resident members of their staffs as may be agreed upon between the secretray-general, the government of the United States and the government of the member concerned.''

No ceilings are set on the size of diplomatic missions. The agreement also states the United States must give diplomatic visas to legitimate representatives assigned by any government to the United Nations and may expel those who abuse their privileges.

Under the U.S.-U.N. pact, the secretary-general and U.S. authorities ''shall settle by agreement the channels through which they will communicate regarding the application of the provisions of this agreement and other questions regarding the headquarters district.''

Disputes which arise can be taken to the General Assembly's Host Country Committee, currently headed by Ambassador Constantine Moushoutas of Cyprus. The committee deals with the U.S. government through its U.N. mission that has one official, Robert Moller, who devotes full time to such matters.

If the committee is unable to resolve the dispute, it ''shall be referred for final decision to a tribunal of three arbitrators,'' according to the agreement. One arbitrator would be named by the secretary-general, one by the United States and a third chosen by these two or, if they should fail to agree, by the president of the World Court at the Hague.

Safranchuk said the Soviet Union will bring up the expulsion order at the Host Country Committee's next regular meeting March 18.