More than 3,000 chanting, sign-carrying anti-Nazi demonstrators turned out in the heart of Chicago's Loop yesterday to protest a planned demonstration by about a dozen members of a neo-Nazi organization.

The demonstrators, including representatives of the Jewish Defense League and several black groups, arrived at a courtyard outside Chicago's federal building hours before the Nazis were scheduled to appear for their planned half-hour rally.

But the Nazis, headed by Frank Collin, the 33-year-old son of a German concentration camp survivor, hadn't shown up more than 40 minutes after the march was scheduled to begin at 5:30 p.m. EDT.

The anti-Nazi demonstrators in the Loop represented groups that had planned to protest a scheduled Nazi rally originally set for today in the Chicago suburb of Skokie. But the Skokie demonstrations were canceled last week, making yesterday's down-town demonstration the weekend's main event.

The crowds awaiting the Nazis, who were to march in the shadow of a giant orange sculpture by Alexander Calder in the courtyard of the Federal Building, were generally peaceful although occasional shouts of "Kill the Nazis" rang out. At least 11 organized anti-Nazi groups were represented.

One plainclothes policeman was hospitalized after a struggle with an anti-Nazi demonstrator who apparently thought the officer was a Nazi, but not other unruly conduct was evident.

The demonstrators held anti-Nazi slogans on brightly colored banners that they waved beneath a clear blue sky.

More than 250 uniformed Chicago police wearing riot helmets and carrying night sticks were present - the heaviest police protection ever provided for a demonstration here.

One anti-Nazi demonstrator, Rich Kaufman, said, "I've been involved in civil rights demonstrations and peace demonstrations. The police never gave us the protection they're giving these lunatics. When I marched with Martin Luther King in Marquette Park in 1967, the crowd was throwing bottles and rocks at us and there were no police."

A man in an Abraham Lincolm costume carried a sign that read "Ban the Nazis" while he chanted "Death to the Nazis."

Yesterday's events followed an intense, 14-month court battle to determine when and where Collin and his small band could present to the public their ideas about the superiority of the white race.

The legal dispute, which wound its way at different points to the Illinois and the U.S. Supreme Courts, posed a difficult emotional dilemma for many whose dedication to the general ideal of free speech was offset by their disgust with the specifics of Nazi ideology.

Timing added a sharp edge to the issues because several crucial legal proceedings occurred this spring as the Nazi Holocaust was being replayed on nationwide television.

In Chicago, however, the chief issue for many of the participants was not so much the freedom to speak as the freedom to enjoy one's home turf.

Chicago and its suburbs constitute a patchwork of ethnic neighborhoods with fairly definitive boundary lines setting off one group's territory from another's.

Collin's home turf is the Marquette Park section of southwest Chicago, a neighborhood of neat, single-family homes on tiny lots. The virtually all-white neighborhood is bordered on the east by Western Avenue, a commercial strip lined with taverns and used-car lots. Across the border is an equally neat neighborhood that is as black as Marquette Park is white.

Collin and his Nazis were angered when black protesters marched several blocks into the white side of Western Avenue to demonstrate against racial bigotry. Collin sought permission in the spring of 1977 to hold a Nazi rally in his neighborhood to protest the black "invasion."

The Chicago Park District refused the application. In reponse, the Nazis swore to undertake their own "invasion" by staging a march in Skkie, a middle-class white suburb that is about half Jewish.

Skokie's village council enacted a series of broadly worded ordinances to keep the Nazis out. By their terms, the ordinances would have prevented anyone from marching in the village in "military style" uniforms or from portraying "lack of virtue" in any racial or national group.

Collin and his lawyer David Goldberger, a Jewish volunteer for the American Civil Liberties Union, won a federal appeals court order last month dissolving the Skokie ordinances.

Skokie had argued that the Nazis' ideas were "obscene" and thus outside the First Amendment's protection. The court, however, said the law of obscenity applies only to "erotic materials."

It also rejected the village's suggestion that the Nazi march was likely to incite physical confrontation in the village, saying that suggestion was too speculative a ground for impairing First Amendment rights.

The court order set the stage for what might have been a major confrontation in Skokie today. But a subsequent court order last week caused Collin to call off that march.

A federal trial court here said that Collin could march in his neighborhood, Marquette Park. Collins, saying that his threat to go to Skokie had been a bargaining chip to win him the right to march near his home, dropped the bargaining chip and started planning for a large Marquette Park rally July 9.

Yesterday's march in downtown Chicago was to be a warm-up for the July rally. Anti-Nazi demonstrators who had planned to confront Collin in Skokie decided instead to challenge the Nazis yesterday.

Collin seemed delighted by the trouble he had caused the establishment here. Chortling over the success of his "bargaining-chip" ploy, he observed that "democracy can get things done easily when it's in democracy's interest."