More than four-fifths of the windfall that states could have gained because of federal-tax revision has gone back to the taxpayers, according to a national survey released yesterday.

Twenty-two states greatly revised their tax codes after Congress approved a sweeping federal tax measure last year, and nine other states were reviewing their codes, the National Governors' Association said.

The survey, published by the governors' association and the National Association of State Budget Officers, also said growth in state spending rose by a modest 6.3 percent in fiscal 1987, not adjusted for inflation.

States that changed their tax codes generally did so by broadening tax bases, decreasing tax rates, boosting personal exemptions and standard deductions, and changing the number of tax brackets, the survey said.

Without these changes, states could have collected an additional $6 billion in taxes because of federal tax revision, according to the study.

"Thirty-one states to date have addressed the issue . . . and have returned 81 percent {$4.6 billion} of this estimated 'windfall' to the taxpayers," said the report's executive summary.

Even so, the states' net increase in tax revenues was $6.1 billion, the survey said.

Listed as returning the windfall were Arizona, California, Connecticut, Delaware (for tax year 1988), Georgia, Hawaii, Iowa, Maine, Minnesota, New York, Ohio, Oregon, Virginia, West Virginia and Wisconsin.

Keeping the windfall were Alabama, Idaho, Illinois, Indiana, Kansas, Louisiana, Massachusetts, Mississippi, Missouri, Montana, New Mexico, North Carolina, Oklahoma and Utah.

Colorado and Maryland are listed as keeping a portion of the windfall. Kentucky did not meet in regular legislative session this year; Michigan was expected to take action this year. In the remaining states, the question is not applicable because of the nature of their tax laws, the survey says.