About 40,000 antiabortion activists marched through the streets of Washington to the Supreme Court yesterday to mark the 13th anniversary of the court's landmark 1973 decision legalizing abortion.

The demonstrators held aloft banners, placards, and especially red roses, which have become the symbol of their movement. The protest snarled traffic for hours along a 1 1/2-mile route from the Ellipse to the Supreme Court.

President Reagan, addressing a premarch rally by electronic hookup from the White House, called women who choose not to have abortions "heroic" and said he wanted to overturn "the tragedy of Roe versus Wade," the 13-year-old Supreme Court decision.

"By your presence today, you reaffirm the self-evident truths set forth in our Declaration of Independence," Reagan said. "Together we will ensure the resources of government are not used to promote or perform abortions."

Reagan's comments marked the second year in a row he has addressed the March for Life rally, an annual event sponsored by a coalition of antiabortion groups. The protest typically has drawn huge crowds of protesters. Yesterday's demonstration was far smaller than last year's, however, when police estimated that more than 70,000 persons participated.

With the Washington march leading the way, demonstrations by abortion opponents and prochoice groups were reported throughout the nation -- from Boston to Los Angeles.

Reagan met with 26 antiabortion leaders at the White House, and one of those in attendance, Jack Willke of the National Right to Life Committee, said Reagan told them antiabortion violence is hurting their cause.

"He did mention that if that would quit, our movement would get a lot of brownie points," Willke said.

Another antiabortion leader who met with Reagan, Paul Brown of the American Life League, said the president stated that he would consider granting pardons to some persons convicted of bombing abortion clinics. But White House spokesman Albert Brashear said Reagan did not say that.

As a counterpoint to the march, the National Abortion Rights Action League sent a telegram to Reagan Tuesday asking him to use his "personal credibility" with antiabortion groups to end attacks on abortion centers and family planning clinics.

Presidential spokesman Larry Speakes said yesterday he did not know about the telegram and did not believe it had been called to Reagan's attention.

Wednesday's demonstrators, many of whom have attended the annual march in past years, included robed monks, Black Muslims, Orthodox Jews, atheists, teen-agers in punk outfits, senior citizens and parents pushing babies in strollers. They came by the busload from all over the country, some of them traveling all night and arriving early yesterday for the march.

When the two-hour procession arrived at the steps of the Supreme Court, about 100 protesters dropped to their knees on the stone steps and recited the Lord's Prayer. Others shook their fists and screamed at police who blocked their way into the court building. A police spokesman said 10 persons were arrested for illegally demonstrating on the plaza in front of the building.

A man who identified himself as Jerry Horn, a pastor with a Christian center in Appleton, Wis., held up a human fetus on a blue velvet pillow while standing on the court steps. Horn said the fetus was 18 to 20 weeks old, and was one of 13 fetuses he had collected from abortion clinics in the Midwest.

Horn told reporters gathered on the steps that the fetus had been named "Baby Choice." Supreme Court police tried to arrest Horn, but supporters surrounded him and he disappeared into the crowd.

Cathy Huber, an assistant district attorney in Outagamie County, Wis., said that Horn had been convicted twice for trespassing at abortion clinics near Appleton in recent years, and that he has come under investigation to determine how he obtained some of the fetuses. No charges have been filed by Wisconsin officials against Horn in connection with the fetuses, Huber said.

In separate demonstrations elsewhere in the Washington area, 33 antiabortion activists were arrested when they tried to block the entrances of clinics where abortions are performed.

At the Hillcrest Women's Surgi-Center on Pennsylvania Avenue SE, police said, 10 persons were arrested for violating police lines. The center was the site of a New Year's Eve bombing attack in 1984.

In two other demonstrations, at medical buildings in Irving Street NW and on Martin Luther King Jr. Avenue SE, 23 persons were arrested on similar charges.

The National Organization for Women held a small counterprotest at the Supreme Court building before the marchers arrived. About 30 watched a satirical skit by a group mockingly calling themselves "Ladies Against Women." Actresses in the skit chanted, "No condom, no IUD, we believe in chastity."

Most of the NOW members left before the antiabortion march arrived, but a few lingered, which led to shouting matches between the two groups.