Top political appointees of the Carter administration, members of Congress and federal judges would get salary increases of from 20 to 40 per cent next month under a pay plan that President Ford's top salary adviser has urged him to accept.

Pay raises of that size, proposed last month by a blue-ribbon citizen's group, also would benefit more than 20,000 career government and military executives. They would get increases, depending on their grade, of from $945 to $9,400 a year. The top civil service salary would go from $39,600 to $49,000 under the plan if Ford includes it in his final budget that goes to Congress Jan. 17.

Under the executive-legislative-judicial pay law, the pay raises would go into effect automatically within 30 days unless vetoed by either the Senate or the House.

Civil Service Commission Chairman Robert E. Hampton, this column has learned, has endorsed the pay package and urged the President to send it to Congress Hampton, a Republican who has served on the CSC under President Kennedy. Johnson, Nixon and Ford, has suggested that Ford avoid linking the pay increases to any congressional reforms.

The salary commission that recommended the substantial increases last month said they should be put into effect only if Congress demonstrates that it plans to put itself under a strict - but unspecified - code of conduct to avoid most outside business interests and earnings.

Hampton favors tough new conflict-of-interest rules for Congress, he has told the President, but doesn't believe it is appropriate - or politically wise - for an outgoing Republican administration to dictate in-house policy to the overwhelmingly Democratic House and Senate.

There also is the practical political problem that Congress could become bogged down in writing and approving a code of conduct for itself and wet the pay raises die.

Under the law, Ford must make some kind of executive-legislative-judicial salary recommendation to Congress before he leaves office. He is free to recommend almost any plan he wants.

Many insiders felt that the would shy away from taking the unpopular - and perhaps personally unpleasant - chore of recommending pay raises for top government officials, especially for the appointees of the man who defeated him.

Some presidential aides, including at least two lame-duck federal agency heads, reportedly recommended that the out-going President recommend "peanuts" for the new administration and let the Carter people - if they dared - push through pay raises for their own appointees.

The Associated Press recently reported that Ford might leave the entire salary problem up to Carter, a move that would obviously embarrass the new President.

Carter officials secretly hope for the maximum increases. But they obviously would like to avoid the appearance of pushing for the pay increases. Carter's designated director of the Office of Management and Budget has talked of tax cuts, governmental economics and even speculated on federal job freezes. But he has avoided - like it was coated with anthrax germs - any discussion of executive pay raises.

If Ford recommends the full amount of the pay raises as proposed by the salary study group and endorsed by Hampton, these would be representative increases:

Members of Congress, from $44,600 to $57,500, a 28.9 per cent increase.

Federal judges, now at $44,600, would go up the most - a 45.7 per cent increase to $65,000.

Deputy secretaries of major departments, up from $44,600 to $60,000, a 34.5 per cent increase.

Cabinet officers would get the smallest increases under the plan, a 7.1 per cent boost, bringing them to $67,500.

White House aides stress that Ford still has not made up his mind on the final amount. But they concede that with Hampton's backing, and the support of other top advisers who don't want to go on the record now, odds are good that the President will give the incoming Carter administration a real going-away present and authorize the maximum increases as proposed to him.