DS2 doesn't like loud fireworks, so we use the same kind of earplugs that we use when he swims or takes a bath. I believe they are called Mack's (or maybe just Mac's) or something along those lines. We get them in the ear care section at the grocery store. They have junior sized ones for little people. We started off using the regular ones, but breaking them in half for his tiny ears. Then one day, we discovered they had smaller sizes. And they come in different colors. He likes the bright neon orange! Also pretty cheap. The ones we get come with 4 sets (8 total) in a small plastic box. They are just blobs of a silicone type material that you form into a ball and press into the ear. We originally got them to protect his ears from infection when he had tubes inserted, but they work well for blocking the loud noises, too. And he can still hear us talking to him in a normal voice (though, he still really likes to ignore us at time). Hope that helps.
By the way...he loved the 4th of July fireworks here in DC. While all the other little kids around were crying, or holding their ears, he was laughing and naming all the colors he saw. It was great!