Social Security benefits will go up 3.5 percent next year and Social Security taxes will also rise, the government said yesterday, but income taxes will fall slightly as the tax code for the first time is automatically indexed to offset the effects of inflation.

The Office of Management and Budget also said that under existing law, about 3.5 million federal civilian and military retirees will get a 3.5 percent cost-of-living increase in their pensions in January. A similar increase will go to recipients of veterans' pensions.

Both the Social Security and income tax changes are automatic under existing law, but their extent became known yesterday when inflation figures for the past 12 months were announced.

Under indexing, the standard deduction, personal exemption and cutoff figures for each tax bracket will be increased 4.08 percent for the taxable year 1985. This means that the $2,300 standard deduction for an individual will go up to $2,390; the figure for a couple will go up from $3,400 to $3,540. The $1,000 personal exemption for each member of a family will go up to $1,040.

For many taxpayers, however, the savings from indexing will be offset by higher Social Security taxes.

The Social Security changes, announced by Secretary of Health and Human Services Margaret M. Heckler, are as follows.

A total of 37 million Social Security beneficiaries and 4 million low-income Supplemental Security Income (SSI) recipients will get a 3.5 percent cost-of-living increase for 1985.

SSI recipients will receive their increase in checks due Dec. 31, Social Security recipients in checks received Jan. 3, 1985.

The Social Security payroll tax for employes, now 6.7 percent on the first $37,800 of wages, will rise automatically under existing law to 7.05 percent on the first $39,600, starting Jan. 1.

This means that the Social Security tax for workers earning $39,600 will be $2,791.80 in 1985 -- up from $2,532.60 in 1984. Fifteen years ago, the tax for the maximum earner was $374.40.

The net tax rate for self-employed persons will rise from 11.3 percent to 11.8 percent. This rate, combined with the new $39,600 wage base, means a self-employed person at the maximum will pay $4,672.80 in Social Security taxes in 1985, up by $401.40 from 1984.

Social Security beneficiaries under 65 will be permitted to earn wages up to $5,400 in 1985 without reduction of benefits, compared with $5,160 this year. Above $5,400, benefits will be cut by $1 for each $2 earned.

Those from 65 through 69 will be permitted to earn wages of up to $7,320 in 1985 without reduction of benefits, up from $6,960. Above $7,320, benefits will be cut $1 for each $2 earned. For recipients 70 or over there is no earnings limit.

These earnings limits apply only to money earned through a job. Interest, dividends and other pensions are not counted as wages for the purpose of determining the earnings limit.

Social Security spokesman James Brown said that as a result of the changes announced yesterday, the average monthly benefit for a retired husband with a dependent wife receiving the 50 percent spouse benefit would go up from $750 to $776 a month for the couple.

Brown said the average retired worker living alone, now receiving $434 a month, will receive $449. The average aged widow, now getting $401, will get $415. The average disabled worker with a wife and child, now getting $863, will get $893.

In the SSI program, a welfare program for impoverished aged, blind and disabled persons, the maximum payment for a single person without other countable income will rise from $314 a month to $325; for a couple, from $472 to $488.

The new indexing system for the federal income tax, co-authored by Sens. Robert J. Dole (R-Kan.) and William L. Armstrong (R-Colo.) as part of the 1981 tax bill, is pegged to increases in the Consumer Price Index in the year that ended Sept. 30.

Under indexing, tax brackets -- the income categories used to determine what tax rates are charged -- will be raised as well as the standard deductions and exemptions.

All this means that a typical taxpayer whose income rises only as fast as inflation will pay no more in taxes in 1985 than in 1984 because, while he will have a higher income, his deductions and exemptions will go up correspondingly as will the point at which he moves into a higher tax bracket. A taxpayer whose income does not rise will actually pay less