Dogs are often frightened by fireworks on the Fourth of July.
CNN  — 

For most people, the Fourth of July means cookouts, sunny afternoons by the pool, and evenings full of fireworks.

But for dogs, the loud bangs can be a nightmare.

That’s why some inmates in Brevard County Jail in Florida, are spending this Independence Day comforting homeless dogs frightened by fireworks and other loud noises.

To help ease the dogs’ pain and anxiety, the inmates will read, play and feed dogs at the Brevard County Sheriff’s Office Animal Care Center during the peak hours of celebration, the sheriff’s office announced Friday.

“Our goal is to not only help calm the dogs but also to help build and instill a sense of purpose and compassion in the inmates that will hopefully aid them as they transition back into society once they have served their time,” the sheriff’s office said on Facebook.

Originally started as a suggestion by citizens before turning into “an amazing idea to help calm our homeless pets,” this is the second year in a row inmates at the jail have spent the holiday comforting dogs, according to the sheriff’s office.

Measuring between 150 and 175 decibels, fireworks are louder than gunfire (140 decibels) and even many planes at takeoff (120 decibels). The loud noise, coupled with bright flashes, can confuse and scare dogs, inducing stress-related symptoms, including heightened heart and respiration rates.

Dogs also hear at higher frequencies — between 45,000 and 65,000 hertz, compared to humans’ 20,000 hertz — which can make prolonged noise physically painful.

CNN’s Sandee LaMotte contributed to this report.