Celebrating their country and themselves, more than a half million unabashedly patriotic, flag-waving Americans lined streets from Andrews Air Force Base to the White House yesterday, crushing together on sidewalks, bridges and rooftops to catch a fleeting glimpse of a caravan of Metro buses carrying their 53 countrymen made heroes by captivity.

As the buses rolled slowly along the 12-mile motorcade route, the barely visible hostages and their families seemed to douse the massive crowd in a king of goose-bump, hand-clapping, teary-eyed pride. Flags, buttons, ribbons and signs made it appear that the official American colors for the day were red white blue and yellow.

"I yelled and I screamed and I waved the flag. It was something that I had to do," said Lois Layton, who took off work yesterday and drove north from Norfolk, Va., for the motorcade. "It's like a release to me. We've been glued to the radio and the TV, feeling the hurt and the pain. I couldn't go over to Iran and fight. But I can come here and scream."

Although it was not an official national holiday, yesterday's exuberant, well-behaved crowd was as large as that assembled for President Reagan's inaugural parade one week ago. At several points along the route, people were lined 25-deep to watch the joyous passing show.

Later, 35,000 people gathered near the Washington Monument to watch a 15 minute, $25,000 fireworks display that featured 2,500 different bursts of color. Listening to prerecorded patriotic music that blared from loudspeakers across the Mall, they cheered at the mention of the eight military men who lost their lives last spring during the abortive attempt to rescue the hostages in Tehran. More cheers followed for each of the freed Americans as their names were read and 53 yellow-ribbon-bearing rockets were launched in their honor.

The celebration began at 11:45 a.m. when Freedom One, the first of four jets carrying the hostages and thier families from Stewart Air Force Base in New York, appeared in the glowing orange of the southern horizon.

The door of Freedom One was thrown open, the Navy Band struck up "God Bless America" and Bruce Laingen, who 14 1/2 months ago was charge d'affaires at the American Embassy in Tehran, emerged with both arms outstretched, flashing V-for-victory signs.

As Laingen, other former hostages and their families descended from the airplane and moved toward the smiling dignitaries, a roar went up from the more than 8,000 military personnel and their families who had gathered. The Navy Band launched into the first of four complete renditions of "Tie a Yellow Ribbon." After shaking hands with Vice President George Bush and other officials, the former hostages walked slowly to where members of their "extended" families were corralled within a barrier of ropes and oil drums.

Once inside the barrier, the former captives and those who had been forced to wait so long for their release shared squeals of deligt, tears, hugs and kisses. One woman, reportedly the sister of Kathryn Koob, of Fairfax, Va., swooned and was taken off the tarmac by an Air Force ambulance. The woman later rejoined her family in time to board the buses bound for the White House.

Also joining the group was the 53rd hostages Richard I. Queen, who was released earlier by the Iranians after he was stricken with multiple sclerosis while in captivity. Queen rode into town in the bus caravan and participated in the White House ceremonies.

The 16 Metro buses, packed with the 53 former hostages and 350 family members, left Andrews at 1 p.m. through the base's ribbon-festooned main gate where a crowd of several hundred sang "This Land Is Your Land."

"There has been nothing like this since the end of World War II," said Shirley Arbogast of Forestville who stood near the gate, cheering, with her arms wrapped in yellow ribbons.

From Andrews to the White House, those on board the buses seemingly could look nowhere without seeing yellow. There were strands of yellow yarn in little girls' hair, yellow rain slikers, yellow stripes on police officers' coats, yellow extension cords, yellow wheelchairs, yellow flowers and a clown in yellow face and yellow suit.

"I'm yellow all the way through," said Dorothy Lewis Carroll of Suitland, who was wearing a yellow kerchief, Christmas bow and slacks. "I've got on a yellow blouse, and you can take my word for it, I've got a yellow bra on, too. God, this is exciting."

On Suitland Parkway, which had been washed and swept and where about 55,000 spectators stood three deep on the grassy embankments, a welcome-home banner was strung between the raised beds of two Prince George's County government dump trucks.

Aboard the first bus, where Laingen sat with Vice President Bush, the former hostages and their families were delighted. "Holy Cow, look at this," said one. "Balloons and everything, look at all those people," said another.

Laingen, at one point flashing a V-sign out the window, turned to Bush and said: "You must feel like you're back in the campaign."

Said Bush: "Not quite."

Near the South Capitol Street Bridge, in the bleakest, most rundown stretch of the motorcade route, a large and friendly crowd of black residents from the neighborhood and white workers from the Navy Yard chatted and joked, agreeing they'd all been unified by the return of the hostages.

"This is the greatest unifying, patriotic thing this country has ever seen," said Tommy Meeker, a 37-year-old weapons analyst from Burke who stood on an overpass waving a large American flag.

Five-year-olds from a kindergarten class at Syphax Elementary School, one block away, held hand-lettered signs, including one advising the hostages to "Go Home And Relax." Their teacher had told them before the motorcade that some of the people in the buses had been "held some place outside their home for a long time and now they're coming."

In the neighborhood not known for its friendly relations with the Metropolitan police, the infectious goodwill of the day prompted cheers for the former hostages' escorts. "Let's hear it for the cops," yelled one black man and hundreds yelled, raised clenched fists and waved flags.

Minutes later, the motorcade was gone and some in the crowd seemed dissappointed. "All we got to see was the bus drivers," said one spectator. He quickly added, "but it was still great."

Unlike the inauguration where elaborate security prevented spectators from interfering with the parade, the crush of yesterday's exuberant crowd had the motorcade barely moving at five miles an hour, much slower than the intended 15 miles an hour.

Twice the crowd's sheer numbers forced the motorcade to stop, once near Third Street and Pennsylvania Avenue and again at 15th Street. There were panicky calls on the police radio as police ranks stretched thin: "We've lost the crowd. We've lost the crowd."

But police and National Park Service officials said there were not reported injuries or arrests during the 90-minute motorcade. Metro reported that the subway system worked smoothly with few delays at any of the stations near the motorcade route.

At the corner of Third Street and Independence Avenue, where thousands cheered from sidewalks and hundreds more waved from the windows and roof of the Health and Human Services building, hawkers were sold out of welcome-home buttons an hour before the motorcade arrived at 2:02 p.m.

All along Third Street, high school cheerleaders broke into their well-rehearsed routines, joggers pranced by with wide yellow ribbons tied around their heads and suburban housewives pulled their children from picnic blankets on the Mall to jostle for a vantage point. Red Tannan of Chevy Chase, nine feet tall on stilts, loped through the crowd in an Uncle Sam outfit with blue satin tails and red-striped pants.

Richele Pitalo, 11, who'd come to Washington from Biloxi, Miss., for the motorcade, was disappointed that the former hostages passed by without stopping to accept a gift she'd been holding since Dec. 10, 1979.

"I've left my Christmas tree up in our family den since President Carter said he wasn't going to light the top of the National Christmas Tree," Richele said. "I have 52 ornaments, one for each hostage."

Since she'd been told that she could not see the former hostages herself, Richele said she had to give the ornaments to her congressman so that he could make the delivery.

Despite its overwhelming patriotism, the day did not pass without a smattering of dissent. At Sixth Street and Pennsylvania, the motorcade rolled by Tom Kelly, who was hawking copies of the Revolutinary Communist Party's newspaper and suffering abuse f rom spectators suffused with nationalism. "Ya commie," yelled one man to Kelly, "go home to Russia."

One young peddler sold $5 red-white-and-blue T-shirts called "The American Dream," which depicted the famous raising of the flag at Iwo Jima with a jingoistic twist: The flag was rammed straight into the rear end of a pained-looking Ayatollah Ruhollah Khomeini.

At a construction site on Pennsylvania, workers hoisted a banner reading: "We Did It To Japan, Do It To Iran."

At 2:25, when the motorcade came into view near the District Building, the throng rushed from the sidewalk into the street, leaving only one narrow lane for the passing motorcade. The freed Americans returned cheers from opened windows of their buses, waving back, giving the thumbs-up sign and exchanging flags and ribbons with the crowd.

At the rear window of the 16th Metro bus, someone held out a sign that read: "USA -- 52, Iran -- 0."

After the motorcade was gone, most of the crowd raced over to the south fence of the White House, straining on tiptoes and climbing on each others' shoulders for a view of the ceremonies on the South Lawn. Again, there was patriotic music. The crowd spontaneously broke into "God Bless America."

After the two-hour welcoming ceremony, the freed Americans and their families once again boarded the 16 buses, this time bound for their hotel in Crystal City.

As night fell on Washington, distant church bells pealed.