The South African government increased taxes in its annual budget today, as racial unrest aggravated by the worst recession in half a century claimed more lives in several parts of the country.

Thirteen blacks have been killed during the past eight days in clashes with the police in eastern Cape Province, where unemployment is at its worst, and two were killed today in Johannesburg's black ghetto of Soweto.

Civil rights workers warned that the higher taxes, especially an increase in general sales tax, was likely to make the situation more explosive as hard-pressed blacks struggled against soaring inflation.

At the same time there seemed a danger of an increased backlash from conservative whites, who also are feeling the economic squeeze and whose resentments are directed toward the government of President Pieter W. Botha because it says it is moving to reform the country's segregationist system called apartheid.

The budget, presented by Finance Minister Barend J. du Plessis, increased personal income tax and general sales tax by 2 percent and raised taxes on the country's lucrative gold, diamond and other mines as well as on imported automobiles and electronic equipment.

The sales tax, which applies to all purchases except some basic foodstuffs, is now 12 percent, double what it was in January last year.

Coming on top of a 40 percent gasoline price rise and big increases in transport and telecommunication costs announced last month, economists said it would push the inflation rate from its present 13.9 percent to near 20 percent before the end of the year.

There is fear this surge in living costs in the midst of recession and growing unemployment will increase the unrest in the black ghettos.

"People are at the end of their tether, they just can't make ends meet any more," said Sheena Duncan, president of the country's leading civil rights organization, the Black Sash. She said the situation was made more explosive because the government's declared reform intentions had led blacks to expect an improvement in their quality of life.

The prospect of a backlash from white conservatives became evident two weeks ago when civil servants reacted angrily to a government decision to demonstrate its determination to trim spending by cutting their salaries 4 percent.

The austere budget is likely to add to this anger, which is causing many white Afrikaner civil servants to desert the ruling National Party and join the far-right Conservative Party, which opposes Botha's proposals for change.

The increase in income tax means white South Africans, who have grown accustomed to one of the world's highest living standards, now constitute one of the world's most heavily taxed societies, with a 57 percent tax rate for people earning more than $30,000 a year in a society with little social security.

Ironically, it is the continued costliness of maintaining apartheid that compelled Du Plessis to raise taxes. He made strenuous efforts to reduce spending, and boasted that by keeping the budgeted increase in spending for fiscal 1985 to 11.4 percent, he had held it to less than the inflation rate. But the huge expense of trying to develop separate national states for the blacks still plunged him into the red.

The amount to be spent on trying to develop the poverty-stricken and overcrowded tribal "homelands," to which millions of blacks have been sent, and on the disputed territory of Namibia, is increased by 27 percent to $1.8 billion.

Du Plessis announced a 19 percent increase in spending on education, saying the government was now committed to "the goal of equal opportunity in education regardless of race, color, creed or sex," although education remains segregated.

For years there has been a wide disparity between the amounts spent on white and nonwhite education. While the government is now committed to closing this gap, Du Plessis did not indicate how the 19 percent increase in spending is to be allocated.