WHEN GEORGE PEABODY set up the Peabody Education Fund in 1867 to assist the Civil War-stricken South, he invented the charitable foundation as we know it.

He also institutionalized the process whereby the aging economic barons of late 19th century America - in an effort to outrun either outraged public opinion, their own uneasy consciences or the tax collector - threw money at the social problems they had often helped create in their climb to the top.

Peaboy, a Massachusetts investment banker, found himself growing rich off the wartime economy of his suffering nation, and presumably that bothered him. Other successful capitalists like Carnegie and Rockfeller took up his foundation idea as time wore on, finding, in a combination of piety and plunder, the moral justification for an economic system then governed largely by the principle of predator and prey.

In the heyday of social Darwinism, as many historians have noted, the charitable foundation was clearly an idea whose time had come.

Today, more than 26,000 charitable foundations dot the tax-exempt lists of the Internal Revenue Service. They range from the $2-billion Ford Foundation, whose $1-million-a-day income underwrites everything from think tanks to nations, to the $150,000 Dyer-Ives Foundation of Grand Rapids, Mich. Dyer-Ives grants last year's financed, among other things, a community-wide poetry contest and a solar-heated shower in a city park.

Theoretically it is still more blessed to give than to receive, but today's foundations function in a crossfire of criticism from both outside their ranks and within - criticism questioning not only the premises on which they were founded but assumptions on which they continue to exist.

"There is a general feeling," as columnist James J. Kilpatrick told a panel discussion the other day at the annual conference of the Council on Foundations here in Washington, "that a foundation is in being primarily for the purpose of doing good for those who endowed it." Critics From Within

WHILE THAT feeling has found its loudest voices in the past among such congressional critics as the late Rep. Wright Patman (D-Tex.), the most intriguing foundation gadflies are those in foundationland itself - a community divided in many ways over what constitutes the public good and how best to serve it.

The major division is between the large foundations and the small. Roughly 10 percent of the foundations account for nearly 90 percent of the $31.5 billion in total foundation assets in the country, and in 1976 they provided more than 80 percent of the $2.13 billion in grants handed out by foundations that year.

The rest of the foundations - roughly 23,200 - are the little guys, with assets of under $1 million each.

There are corporate foundations, family foundations, church foundations, community foundations and foundations consisting of just one foundee. Foundations owe their endowments to everything from beer (Adolph Coors Foundation) and whiskey (Heublin Inc. Foundation) to naked women (Playboy Foundation), dime stores (Kresge Foundation), cereal (W.K.Kellogg Foundation) and football (Redskin Foundation Inc.)

There are foundations named after everyone from boxers (The Gene Tunney and Mary Lauder Tunney Foundation) to politicians (The Richard Nixon Foundation). There are at least four separate Rockefeller foundations, including one designer to pursue the philanthropic aims of the fifth-generation Rockefellers alone.

Theoretically all these foundations are in business solely to give money away to needy causes, but nobody in the foundation business pretends that everybody does that. Nobody, in fact, pretends to know very much about the majority of foundations at all.

While every charitable foundation must file a brief public statement of aims with the IRS to maintain its tax-exempt status, only 465 of the 26,000 publish an annual report, and many of those tell little.

The Foundation Center, a non-profit organization designed to help the grant-seeker find the right path through foundationland, makes a stab at keeping track of things things with major libraries in New York and Washington, an advisory service, a newsletter and a computerized catalog of where foundations are and what they do.

But the center's directory lists only 2,818 - scarcely more than 10 per cent of the total. Carol Kurzig, director of library services for the center, says that most foundations never even answer the centre's information inquiries and that many actively fight any listing in the catalog at all.

"They say they don't want to be flooded with a lot of applicants," she said.

It is this shadowy charater of foundationland that has led some foundation critics in and out of Congress to assume that the vast majority of foundations must be either padding their founder's tax return or fronting for the CIA.

Such suspicions in the past have led to congressional inquiries and murmurs of taxing the philanthropy business, and those murmurs tend to make the average foundation trustee pale and sweaty.

Thus the Council on Foundations, in an effort to tone up the sagging image of philanthropy, tries gamely to improve things from the inside. At the annual conference here Council information officer Saul Richman, John A. Scott of the Gannett Newspaper Foundation and Fred M. Hechinger of the New York Times Co. Foundation sought valiantly to convince a seminar audience of about 75 that foundations should permit news coverage of their board meetings. It was a losing cause. Only 8 of the 75 said they'd let a reporter in the door.

"And the real problem foundations, they don't even show up at meetings like this," said Joe Kulin, information services director for the Foundation Center, "They don't even answer their mail."

There is increasing concern in the foundation community that this refusal by many foundation trustees to acknowledge either the quisi-public nature of the tax-exempt foundation or its need for public accountability is beginning to overshadow the vast, legitimate benefits of charitable giving.

The problem is compounded further by the frequent ideological and cultural schism between the sheltered academics who staff and direct the major foundations and the handful of small town business who often direct the small ones.

Even within a single foundation the slip occurs. In January, 1977, Henry Ford II resigned from the board of the foundation his family established, charging that the foundation was "spread too thin" and should devote more time to strengthening the free enterprise system. Ford Foundation president McGeorge Bundy attributed the resignation to "tensions between" which, he said, were "nothing new."

At the conference here, foundation staffers chided their colleagues for being too conservative in their grants and not being adventuresome, imaginative or - as one foundation staffer put it put it "whimsical" in their choice of projects. "The one thing that we can do that government can't do is take chances," said one speaker from the floor. "Thats's our role, whether we are underwriting a scholarship to a secondary school, a study of Latin America or a neihgborhood social service agency." "I Like Poetry"

BUT NOT every small foundation is hidebound or afraid to take chances. The tiny Dyer-Ives Foundation in Grand Rapids describes itself in its pamphlet-sized annual report as as a "catalyst and stimulator for innovative projects in educational, social and cultural fields in the Greater Grand Rapids Area."

Founded 10 years ago by members of the Hunting family, whose fortune comes from office furniture manufacturing, the foundation last year channeled $34,651 into 19 projects raging in size from $276 to $5,000. In addition to the solar shower at Wabasis Lake campground ($1,045) and the poetry contest ($1,046), the foundation provided $1,000 to Grand Rapids Public Schools for a 6th grade educational program in jazz, ragtime and blues, and spent $3,550 to assist in printing five booklets dealing with the history of the Ottawa, Chippewa and Potawatomi Indian tribes in the area.

John Hunting, the foundation's freewheeling 46-year-old president, once brought a group of deliquent teenagers to address to Conference on Foundations because "these meetings are always about people who aren't there."

A former English teacher, actor and amateur soccer soccer player, Hunting is now in New York writing a musical comedy, but figuring out how to spend his foundation's money, he says, is a creative and full-time job.

"Take the poetry contest," he said. "That's an anongoing program. Every year we give a $100 prize for the best poems written by children, students and adults not in school. It hasn't produced a flowering of Grand Rapids, exactly, but I think writing poetry is not only good for the soul, it's good for the community. Anyway, I like petry.

"We're a small foundation and we don't really spend much money, but I think we've done some interesting things and done some good for our city. It's just a question - corny and egotistical as it sound - of trying to make the world a little better place to live, and at the same time being convinced you can do a better job of solving certainkinds of problems than the federal government can." CAPTION: Illustration, "Just a minute, young man, that's not the way we do things here at the Ford Foundation.", by Robt. Day; Copyright (c) 1962, The New Yorker Magazine, Inc.