Two huge corporations here are quietly putting together plans that could revolutionize financing of home improvements beginning this summer.

The corporations, whose nicknames of "Fannie Mae" and "Freddie Mac" are more widely known than their real names -- the Federal National Mortgage Association and the Federal Home Loan Mortgage Corp. -- intend to pump hundreds of millions of dollars into the real estate market by buying improvement loans for the first time ever.

In practical terms, their entrance into this field will mean that credit-strapped savings and loan associations, banks and other thrift institutions, which might otherwise have had to turn down your application for a $7,000 to $12,000 second mortgage, may be able to come up with the loan you need.

Rather than having to depend upon their own deposit resources -- which have been shrinking in many areas of the country -- local lenders will for the first time be able to sell home improvement mortgages in a central, national marketplace, and thus replenish their scarce cash.

The dollars that ultimately finance your new rec room or bathroom won't come from the savings accounts of people in your community, as they have in the past, but from investors on Wall Street and elsewhere who supply capital to Fannie Mae and Freddie Mac. They may well even come from Saudi Arabian petro-dollars or European pension funds.

Fannie Mae is a behemoth, congressionally chartered private corporation with $52 billion in assets. Freddie Mac bought more than $5 billion in home mortgages last year.

The two corporations have been the pioneers during the past decade in creating what is called the "secondary market" for mortgages and deeds of trust aimed at home purchases. By offering to buy local home mortgages that meet nationally uniform standards, they have given S&Ls, banks, credit unions and others the ability to lend out more money for loans on resale and new houses.

That, in turn, has been a major reason why the United States experienced a residential real estate boom during the 1970s.

The fastest-growing sector of real estate-related expenditures by Americans, however, has not been in the purchase of homes. It has been in the home improvement field, where an estimated $41 billion was spent last year alone.

Rapid inflation in housing prices, the costs of energy, and the resurgence of interest in city living have convinced millions of homeowners to spend their money on remodeling and updating what they've got, rather than buying new property.

The boom in home improvements has progressed so fast, according to federal data, that more consumer dollars may be spent on rehabilitation in 1980 than on new homebuilding -- a dramatic reversal of historic trends.

The problem with home improvement finance, however, is that it has traditionally been less favorable to consumers than other forms of real estate borrowing. Loan terms usually have been short -- five to 10 years maximum has been the norm -- and loan amounts have been skimpy. Interest rates in some areas have been very high -- 16 to 18 percent -- and some sources of loans have been fly-by-night operators linked to contracting firms.

There has never been an organized system of sales of these loans, in part because they vary so greatly in size, quality and form throughout the country.

The entry this year of Fannie Mae and Freddie Mac into home improvements -- on the drawing boards here for months but unknown to the public -- should bring about significant changes to all this.

Fannie and Freddie intend to permit local lenders to offer much larger loan amounts than currently available on such loans. Fannie Mae's draft plan would allow home improvement loans of up to $93,250, but the final program is likely to have a somewhat lower limit. Loans will carry terms of up to 30 years -- three times as long as typical terms available in the market today -- and of key importance to borrowers because monthly payments will be cut sharply.

The loans will also prohibit lenders from charging prepayment penalties, and will contain other protections for borrowers. Interest rates will be set periodically by Fannie Mae according to national money market conditions, a big improvement over today's highly variable range of rates, area by area.

Freddie Mac's program will allow loans of $30,000 for improvements on single-family properties and $60,000 on dwellings with two to four units. Loan terms will range from 15 to 20 years. Over 4,000 S&Ls, commercial banks, credit unions and mutual savings banks could begin participating in Freddie's start-up program this summer, according to Keith Stackhouse, the corporation's director of program development.

For its part, Freddie Mac expects to commit $600 million to these loans in the initial phase of the program. Fannie Mae's program, which will probably be in the multi-billion dollar range, is under final negotiation with the Department of Housing and Urban Development.