4th of July M&M Chocolate Cookie Bars
This post may contain affiliate links. Please read ourย disclosure policy.
These festive red, white, and blue Chocolate M&M Cookie Bars make your summer holidays extra sweet! This easy recipe is ideal for Memorial Day, the 4th of July, and beyond. Get ready for smiles!

Want to save this recipe?
Enter your email, and we’ll send it to your inbox. Plus, you’ll get delicious new recipes from us every Friday!
Why I Love These M&M Cookies
There’s something special about summer holidays. In fact, they’re like seasonal bookends, beginning with the euphoria of Memorial Day and the beginning of summer, to the fantastic festivities of the 4th of July, nestled beautifully into the season’s center, and ending with Labor Day and a return to familiar fall patterns.
And interwoven through them all are backyard BBQs, lakeside gatherings, and red, white, and blue. These M&M bar cookies hit all of my must-haves:
- Super Easy to Make: These cookie bars are easier than cookies (one batter, one pan, no scooping, chilling, or waiting for multiple batches.
- Ultimate Chocolate M&M Cookie Bars: If you love dense, fudgy chocolate cookies, you’ll adore these rich, moist, and delicious treats!
- Festive with No Fuss and a Family Favorite: When it comes to festive gatherings, you always need a cookie option and a chocolate option. These M&M cookies bring it all to the table. And puts a smile on everyone’s face with the red, white, and blue!

Ingredients for 4th of July M&M Cookie Bars
Here’s what you need for these simple and utterly soft 4th of July cookies:
- Flour: All-purpose flour is the base of this recipe.
- Baking Soda + Salt: Baking soda helps these bars rise as they bake; salt elevates and balances the flavors.
- Butter: This recipe uses melted butter for the chewiest cookie bars, which means there is no need for your mixer!
- Sugar: I like to use a mix of brown sugar and white granulated sugar in this recipe for an extra soft and chewy cookie bar.
- Eggs: They will bind the ingredients together and add richness to the cookies.
- Vanilla Extract: Bring beautiful flavor to the dessert.
- M&M Candies: You may notice in the recipe images that the M&Ms look extra large. I thought so, too, but I didn’t read the package. After all, they were red, white, and blue (and I’m making them ahead for 4th of July desserts). As it turned out, they were peanut butter M&Ms, which I didn’t realize until I’d baked and cut them. Guess what? They were delicious!! So, I can confidently say that you can use regular-size, mini, or extra-large flavored M&Ms in this recipe! (See my other kitchen mistake that turned out delicious).
- Chocolate Chips: I typically use semi-sweet chocolate chips, but feel free to substitute with white chocolate chips, peanut butter chips, or even butterscotch chips.

How to Make These Red White and Blue Cookie Bars
Preheat the oven to 350℉ and line a 9-inch square baking pan with parchment paper, leaving an overhang to remove the cookie bars from the pan after baking easily.
Whisk the dry ingredients in a bowl and set aside. Then, in a large bowl, whisk the melted butter, brown sugar, granulated sugar, and cocoa powder until no lumps remain. Add the eggs and vanilla extract and whisk to combine. Fold in flour mixture, then add the chocolate chips and candies.


Transfer the dough to the prepared baking pan and press into an even layer. Add additional M&Ms to the top and push them into the dough slightly. Then bake for 20-23 minutes and let cool before cutting into squares.

There is no dough chilling.
I know I mentioned it earlier, but there is no dough chilling needed in this recipe. Yay! This quick and easy dessert recipe is ready in no time. The dough is thick and glossy from the melted butter, but it’s easy to mix and spread in a 9 x 9-inch baking pan.
3 Success Tips for M&M Cookie Bars
- Wait at least 1 hour to cut into cookie bars.
- Line the pan with parchment for easy removal. I love neat edges!
- Don’t over-bake. Check the bars around 18-20 minutes into baking. Ideally, you want the edges set but the center still soft.

More M&M Candy Desserts to Try Next!
If you try this recipe, I’d love to hear your comments and consider giving it a 5-star rating. Explore the recipe index for more easy, delicious ideas, and stay updated by subscribing to our newsletter and following us on Facebook, Pinterest, Instagram, and YouTube!

4th of July M&M Chocolate Cookie Bars Recipe
Ingredients
- 2 cups all-purpose flour
- 1 teaspoon baking soda
- 1/2 teaspoon salt
- 1 cup butter melted
- 1 cup brown sugar
- 1/2 cup granulated sugar
- 1/2 cup unsweetened cocoa powder
- 2 large eggs
- 2 teaspoons pure vanilla extract
- 1 cup M&M’s plus more for the tops
- 1/2 cup chocolate chips
Equipment
Instructions
- Preheat the oven to 350℉ and line a 9-inch square baking pan with parchment paper, leaving an overhang to remove the cookie bars from the pan after baking easily.
- In a medium bowl, whisk the flour, salt, and baking soda and set aside.
- In a large bowl, whisk the melted butter, brown sugar, granulated sugar, and cocoa powder until no lumps remain. Add the eggs and vanilla extract and whisk to combine.
- Add the dry flour mixture to the wet ingredients and mix until combined. The dough will be soft and thick. Fold in the chocolate chips and M&Ms. Be sure to reserve or add extra M&Ms to the top of the cookie bars before baking.
- Transfer the dough to the prepared baking pan and press into an even layer. Add additional M&Ms to the top and push them into the dough slightly.
- Bake for 20-23 minutes, or until they just begin to lose the glossy sheen, the edges are set, but the center looks soft. I begin checking at about 18 minutes. Be careful not to overbake. Cool completely before cutting into bars. Store in an airtight container for up to 3 days or freeze for up to 3 months.but
Video
Nutrition
Nutritional information is only an estimate. The accuracy of the nutritional information for any recipe on this site is not guaranteed.
These are SO fun to make! 4th of July cookies are always fun but this twist on the classic chocolate chip cookie, transforming it into a decadent and easy to make chocolaty cookie bar is absolutely the best! It’s festive and perfect for summer holidays!
I love this twist on classic M&M cookies. The chocolaty base is rich, soft and chewy and making them into bars is so easy! Theyโre festive and fun!