Brazil reported a trade surplus in January despite complaints from exporters that they lost millions of dollars in sales after the United States threatened to raise tariffs on Brazilian goods.

Officials said the January surplus was $1.03 billion, the highest ever for a month whose trade performance is traditionally low. That figure compared with a $35 million deficit in January 1987.President Reagan announced in November he would impose $105 million in tariffs on Brazilian goods because U.S. computer products were locked out of Brazil's market and because that country did not provide adequate copyright protection for software.

But Washington said Monday it would put the sanctions on hold, pending release of a new Brazilian software law. According to Brazil's software law, new regulations must be drafted by April 22.

In disclosing the trade figures Monday, Namir Salek, director of the Banco do Brasil's trade department, forecast a strong export year, thanks in part to the reduced prospects for U.S. sanctions.

He anticipates increased sales to the U.S. market of such manufactured products as video cassette players (assembled from Japanese parts at the Manaus free-trade zone), television sets and air conditioning compressors.

Another obstacle to Brazilian exports, lack of access to short-term credit lines, is expected to be removed with warming relations between Brazil and its international creditors.

Brazil and its major creditor banks reached preliminary agreement last weekend on crucial aspects of a proposed debt settlement. Under the agreement, commercial banks will lend as much as $5.8 billion to Brazil and will restore trade credit lines to former levels.

In return, Brazil will pay the banks $700 million in overdue interest payments.

Nobertro Ingo Zadrozny, president of the AEB foreign trade association, said Brazil's rapprochement with its international creditors and the International Monetary Fund should help extend credit lines from the currently tight one-month limit to at least two months.

Almost $900 million of the $1.03 billion surplus has already entered the federal treasury to improve Brazil's low reserves, Mr. Salek said.

He forecast major steps this year in removing bureaucratic obstacles to Brazilian exports. Brazil, he said, must substitute its current system of

barriers with stiffer punishments for abuses.

The January export surge to $2.1 billion was led by aluminum, cellulose pulp, automobiles and auto parts, shoes, frozen orange juice concentrate, boilers and mechanical instruments. Imports were a low $1.1 billion because less was spent on petroleum ($255 million, down 9.3 percent from the previous year) and wheat ($7 million, down 69.6 percent).

Officials expect February to show a surplus of about $800 million, taking total export sales for the first two months of 1988 above the figure for the first four months of 1987. Brasilia officially forecasts a $11.6 billion trade surplus this year, based on exports of $28.2 billion and imports of $16.6 billion.

Sales to Japan and Western Europe also are expected to improve, due to the weak U.S. dollar, to which the Brazilian cruzado is pegged.