An easy patriotic cookie bar recipe with layers of Oreo crust, white chocolate chips, coconut, and M&M’s

I have been making magic cookie bars for as long as I can remember. My grandmother called them Hello Dolly bars, and they were one of the first things I ever baked on my own. A buttery crust, a pour of sweetened condensed milk, and then delicious layer after delicious layer of whatever you love most. They practically make themselves, which is why this easy recipe has been a classic treat in American kitchens for decades.
This week I am making a red, white, and blue version in honor of the Fourth of July, and I am not exaggerating when I tell you they will disappear in about twenty minutes, the only thing that goes faster is my Easy Ghirardelli Seven Layer Brownie Bar. I swapped the M&M’s colors for the patriotic red, white, and blue mix you can find at most grocery stores this time of year, and the result is one of the prettiest blue desserts, or really any patriotic dessert, you will ever set on a table. These delicious bars are the perfect July dessert for a cookout, a beach day, family gatherings or any patriotic party.
This post may contain affiliate links. Please see my full disclosure for details.
The Easiest Cookie Bar Recipe You Will Ever Make
If you have never made magic cookie bars before, here is the secret: there is no electric mixer, no creaming butter and sugar, no sifting all-purpose flour, no separating wet ingredients from dry ingredients. You do not even need a large bowl. You press a crust into a baking pan, layer your ingredients, pour sweetened condensed milk over the top, and let the oven do the rest. That is it. The condensed milk melts into all those layers and turns everything golden brown and chewy. Some people call them seven layer bars because of all the delicious layers, but the beauty of this cookie bar recipe is that you can adjust the layers to suit any holiday. I make them with seasonal M&M’s for Valentine’s Day, St. Patrick’s Day, Christmas, and of course the Fourth of July.
How to Make Red, White, and Blue M&M Cookie Bars
Start by preheating your oven to 350 degrees. Line a 9×13 baking pan with parchment paper or give it a good coat of cooking spray. You can also use a glass pan if that is what you have.
For the crust, I put Oreo cookies into a ziploc bag and crush them with my rolling pin. You could also use a food processor, but I like the slightly uneven texture you get from doing it by hand. You want about two cups of crumbs. Combine them with half a cup of melted butter, mix until you have an even butter mixture, and press it firmly into the bottom of the pan. This dark, buttery crust is the foundation of everything and gives the bars a deeper flavor than a traditional graham cracker crumbs base.
Now for the layers. Sprinkle one cup of white chocolate chips evenly over the crust, followed by one cup of sweet chocolate chips. Add one cup of sweetened flaked coconut as a top layer. Here is where the patriotic magic happens: scatter red, white, and blue M&M’s generously over everything. I use about a cup and a half of the blue M&M’s cookie bars mix. The delicious red, white, and blue colors against the coconut and chocolate are gorgeous.
Pour one can (14 ounces) of Eagle Brand sweetened condensed milk slowly and evenly over everything. Do not stir. Just let it settle into all the layers. Bake for 25 to 28 minutes. The cooking time may vary slightly depending on your oven, but you are looking for edges that are golden brown and a center that is just set. Let the bars cool completely at room temperature before cutting. I know this is the hardest part, but trust me. If you cut them too soon, they will fall apart.
Tips for the Best Blue Cookie Bars
Store your bars in an airtight container at room temperature for up to four days. If you need to stack them, put a piece of parchment paper between the layers so they do not stick together.
You can make these blue chocolate chip cookie bars festive for any occasion. Swap the M&M’s colors for pastels at Easter, red and green at Christmas, or orange and black for Halloween. I have also made a version with butterscotch chips and milk chocolate chips that is dangerously good. The classic layer magic cookie bar is endlessly adaptable, which is why layer recipes like this one have been favorite treats in kitchens for generations.
If you prefer a buttery graham cracker crust make that in place of the Oreo crust.
If you are bringing these delicious treats to a family gathering or a cookout, I recommend cutting them with a thin knife that you wipe clean between slices. You will get much cleaner bars that way, and they look beautiful arranged on a platter or a baking sheet lined with parchment.
A Festive Dessert Worth Making Again and Again
These red, white, and blue magic cookie bars are one of those easy cookie bar recipes that I come back to every summer. They are the kind of patriotic dessert that looks impressive but takes almost no effort, and there is something wonderful about a recipe that has been making people happy for generations. My grandmother would approve.
What are your go-to recipes for the Fourth of July? Do you have a family favorite that shows up every summer, or are you always looking for something new? I would love to know. You can find the printable recipe card at the end of this post.
Follow Pinecones & Acorns on Instagram, Pinterest, and Facebook and share your holiday baking on social media. I love seeing what you make.
You Might Also Enjoy
Red, White and Blue 4th of July Funfetti Pound Cake
4th of July No Churn Red White & Blue Ice Cream
Easy Patriotic Party Favors for the 4th of July
Print
Red, White, and Blue Magic Cookie Bars
An easy cookie bar recipe with an Oreo crust and patriotic M&M’s.
- Total Time: 38 minutes
- Yield: 16 bars 1x
Ingredients
2 cups Oreo cookie crumbs or graham cracker crumbs
1/2 cups butter, melted
1 (14 oz) can sweetened condensed milk
1 cup white chocolate chips
1 1/2–2 cups red, white, blue M&M
1 cup flaked coconut
1/2 cup patriotic sprinkles
Instructions
Start by preheating your oven to 350 degrees. Line a 9×13 baking pan with parchment paper or give it a good coat of cooking spray. You can also use a glass pan.
For the crust, put Oreo cookies into a ziploc bag and crush them with my rolling pin. You could also use a food processor. You want about two cups of crumbs. Combine them with half a cup of melted butter, mix until you have an even butter mixture, and press it firmly into the bottom of the pan.
Now for the layers. Sprinkle one cup of white chocolate chips evenly over the crust, followed by one cup of sweet chocolate chips. Add one cup of sweetened flaked coconut as a top layer. Then scatter red, white, and blue M&M’s generously over everything. I use about a cup and a half to two cups of the red, white and blue M&M’s.
Once they come out of the oven sprinkle with patriotic sprinkles
Pour one can (14 ounces) of Eagle Brand sweetened condensed milk slowly and evenly over everything. Do not stir. Bake for 25 to 28 minutes. The cooking time may vary slightly depending on your oven, but you are looking for edges that are golden brown and a center that is just set. Let the bars cool completely at room temperature before cutting.
- Prep Time: 10 minutes
- Cook Time: 28 minutes
- Category: Dessert
- Method: Baked










