In his weekly radio address from Washington, Obama urged Americans to work to secure liberty and opportunity for their own children and future generations. The first family was to host U.S. servicemen and women at the White House for a cookout.
Atlanta and Alaska planned holiday runs — thousands were racing up a 3,022-foot peak in Seward. In New Orleans, the Essence Festival celebrating black culture and music kicked off along the riverfront.
The celebratory mood turned somber in Oklahoma and Maine with fatal accidents during parades. In Edmond, Okla., a boy died after being run over by a float near the end of the town's LibertyFest parade. In Bangor, Maine, the driver of a tractor in the parade was killed after the vehicle was struck by an old fire truck.
In Boston, attendance for the city's celebration appeared to be down early, but increased as the start of the festivities approached. Crowds on the Charles River Esplanade seeming smaller than in recent years, while a robust law enforcement presence greeted revelers gathering for a performance by the Boston Pops and a fireworks display.
Among those at Boston's festivities was Carlos Arredondo, the cowboy hat-wearing marathon attendee who became part of one of the indelible images of the bombings' aftermath: helping rush a badly wounded man from the scene in a wheelchair, his legs torn to pieces.
Arredondo said the July 4 celebration — an event authorities believe the bombing suspects initially planned to target — is an important milestone in the healing process, not just for him but also those who were stopping to tell him their own stories of that day.
"I think there's no better place to be," said Arredondo, wearing his cowboy hat and a "Boston Strong" shirt in the marathon's blue and yellow colors.
Kathy Concileo had staked out a nice spot for the evening's concert, near center stage. The Norwell, Mass., woman said she was surprised at the turnout.
"As much as they say we've healed and moved on, I think this shows that people are still afraid to come out in a crowd," she said.
Not everyone was welcoming the masses — Hermosa Beach, Calif., was ramping up police patrols after years of drunken and raucous behavior from revelers. Hartford, Conn., postponed fireworks because the Connecticut River was too high.
Nationwide, anti-surveillance protests cropped up in a number of cities on Independence Day with activists speaking out against recent disclosures that the National Security Agency has been secretly logging people's phone calls and Internet activity. In Philadelphia, more than 100 people marched downtown to voice their displeasure, chanting, "NSA, go away!"
But in Union Beach, N.J., which was destroyed by Sandy, residents had something to celebrate. The working-class town won a party and fireworks contest from the television station Destination America and USA Weekend magazine.
"It's wonderful. Everyone's been so depressed," said Mary Chepulis as she watched a local band perform on a stage that stood where the home next to hers had been.
Every July 3, she and her friends and family would stand on a deck packed with people, food and coolers and watch the fireworks. Next week, she'll find out if the grant money she'll receive is enough to rebuild the home where she lived for 15 years.
Associated Press writers Bridget Murphy in Boston, Katie Zezima in Union Beach, N.J., Christopher Weber in Hermosa Beach, Calif., Stacey Plaisance in New Orleans and Jake Pearson in New York City contributed to this report.