In a reversal of executive branch policy, Secretary of State Cyrus R. Vance yesterday endorsed the "principles" of strong legislation to ban U.S. firms' participation in the Arab boycott of Israel. At the same time, Vance opposed anti-boycott bills recently drawn up in Congress as offensive to Arab nations and thus potentially harmful to the cause of Middle East peace.

Vance's much-awaited statement was greeted with both praise and puzzlement by members of a Senate Banking subcommittee that is considering the boycott issues. Senators applauded his general statements, but expressed difficulty in squaring them with his warnings about the legislation they have drafted.

U.S. legislation against the Arab boycott has been a highly controversial problem, putting Jewish groups and other friends of Israel against business groups that have important ties with Arabs states. The Ford administration strenuously opposed anti-boycott legislation on grounds it would damage U.S. relations with the Arabs and complicate U.S. policy in the Middle East.

The policy reversal announced yesterday was worked out by an interagency committee chaired by State Department officials. A committee member said President Carter's tough anti-boycott statements during his political campaign served as "guidelines" for the governmental reconsideration.

Vance drew a sharp distinction between the Arab nations' "primary" boycott in refusing to trade with Israel, and a "secondary" boycott in which U.S. firms agree not to trade with Israel in order to do business with the Arabs.

Based on his recent talks in the Middle East, Vance said that legislation dealing with the U.S. aspects of the boycott - rather than the "primary" boycott itself - will be understood by Arab leaders. "Although they will not be happy with it, this will not damage our foreign relations," he said.

Vance gave only a few details of his opposition to the two major anti-boycott bills now pending before the Senate committee, but said the administration will work with legislators on a staff level to eliminate objectionable features. Vance suggested that the committee begin with a "fresh draft" to be submitted by the State Department.

The principles for legislation announced by Vance are:

Any foreign boycott-motivated discrimination against U.S. persons on the basis of religion, race or national origin should be explicitly outlawed.

Refusals by Americans firms to deal with any friendly foreign country, demonstrably related to a foreign boycott, should be prohibited.

The prohibitions affecting U.S. firms should not, in general, apply to transactions of foreign subsidiaries of U.S. firms involving the commerce of a foreign country.

A new federal anti-boycott law should preempt state laws on the subject.

Transactions under existing commitments should be covered by a grandfather or grace clause.

Reporting requirements on U.S. firms should be substantially cut back. But boycott reports submitted to the Department of Commerce should be made public.

Vance will be subjected to additional questioning today when he goes before the House International Relations Committee, which is also considering anti-boycott legislation. The Business Roundtable and the Anti-Defamation League of B'Nai B'rith, a big business and a Jewish group, respectively, have scheduled separate meetings in New York today to approve a negotiated consensus on anti-boycott legislation.