These 4th of July M&M Cookie Bars are thick, chewy cookie bars baked in a 9×13 pan with red, white, and blue M&M’s, chocolate chips, and sprinkles. They’re easy to make, easy to slice, and perfect for taking to picnics, potlucks, fireworks parties, and summer cookouts.

Want to save this recipe?
Enter your email & I’ll send it to your inbox. Plus, get great new recipes from me every week!
This page may contain affiliate links; please see my disclosure for policy details. I earn commissions if you shop through the links on this page.
Cookies With A Patriotic Twist
When it’s time for a patriotic celebration, there’s nothing quite like these chewy cookie bars to add some colorful fun! These tasty treats are packed with vibrant colors and a delicious mix of chewy cookie dough and irresistible M&M candies. Whether it’s Independence Day, Memorial Day, or any other patriotic party, these bars are guaranteed to be a crowd-pleaser for kids and grown-ups alike.
I love these bars for packing up and taking to potlucks. They are easy to make in your 9 x 13-inch baking dish, and changing out the M&M’s colors makes them fun for just about any holiday.
What Makes These M&M Cookie Bars So Easy
- Made in a 9×13 pan, so there is no need to scoop or roll the dough.
- Uses basic baking ingredients plus M&M’s, chocolate chips, and sprinkles.
- Easy to slice and pack for picnics, potlucks, and cookouts.
- Chewy in the center with golden edges.
- Change the M&M colors for other holidays.
Cookie Bar Ingredients
This cookie dough is easy to make with everyday baking staples: all-purpose flour, baking soda, light brown sugar, granulated sugar, eggs, and our favorite spice, vanilla.
Add these ingredients to make these bar cookies extra special:
- Semi-Sweet Chocolate Chips: Chocolate chips add flavor and give cookies a delicious textural twist.
- M&M: Not only do the red, white and blue M&M’s make these cookies look cute, but they also add delicious pockets of melted chocolate throughout each bite! Regular M&M’s work just fine. For a patriotic look, you can pick out the red and blue candies or use regular M&M’s and add red, white, and blue sprinkles on top.
- Sprinkles: Patriotic-colored sprinkles make these cookies extra festive.

How To Make Fourth Of July Cookies: Step-By-Step
See the recipe card below for complete instructions.
Step 1. Line a 13″ x 9″ baking pan with parchment paper.
Step 2. Add the softened butter, brown sugar, and granulated sugar to a large bowl. Cream the sugar and butter with an electric hand mixer on medium-high speed.
Step 3. Add the eggs, salt and vanilla, and mix on medium speed until incorporated. You can use your stand mixer for this recipe or a handheld mixer.
Step 4. In a medium bowl, mix the dry ingredients. Gradually add the flour mixture to the batter, mixing until it becomes a thick cookie-dough consistency. Use a rubber spatula to scrape down the sides of the bowl to ensure everything mixes in.
Step 5. Fold in the M&M’s, semisweet chocolate chips and sprinkles with a wooden spoon or spatula until evenly distributed.




Step 6. Press the cookie dough into the prepared baking pan in an even layer. If desired, add additional M&Ms or sprinkles on top. Bake for 30-35 minutes.
Step 7. When done, set the bars on a cooling rack. When completely cooled, you can pull them out of the pan onto a cutting board and cut them into squares. You can also leave the cookies in the pan; just cut and ENJOY!




See all of those colors? That’s why we like to call these fireworks cookies.

M&M Cookie Tips
- Make sure your butter is softened but still cool to the touch.
- Your brown sugar should be soft and fresh. The moisture in the brown sugar helps make these cookies chewy.
- Save some of the M&M’s and sprinkles and press them on the top of the dough right before baking; it gives the cookies more color.
- Do not wait for the center to look completely firm before removing the bars from the oven. The edges should be set and lightly golden, and a toothpick inserted in the center should come out mostly clean with a few moist crumbs. The bars will finish setting as they cool.
Bar Cookies FAQs
Want To Store For Later: Here’s How
Store these cookies in an airtight container for up to four days.
You can also freeze the baked cookies. Once cooled and cut into squares, store the cookie bars in an airtight freezer container for up to three months.
Learn How To Make The Bar Cookie Dough Ahead
Nothing is better than having cookie dough in the fridge or freezer so you can get a head start on party prep or have it ready to bake when needed.
- Make the cookie dough, refrigerate it for up to 3 days, then transfer it to the baking pan and bake.
- Freeze the unbaked cookie dough by wrapping it in plastic wrap, then in an airtight freezer container or bag, for up to 3 months. Allow it to come to room temperature, then pat it in the pan and bake as instructed.
More Patriotic Desserts
Try these favorite red, white and blue desserts for cookies, cakes and more.
- Make these Red, White and Blue Layered Jello Cups and hide a cherry in the middle for fun.
- No Churn Vanilla Ice Cream with M&M’s in the prettiest patriotic colors makes the best Independence Day dessert.
- These 4th of July Sugar Cookie Bars are easy to make in a 9×13-inch pan. Top with creamy icing and colorful sprinkles.
- Here you can find 15 Red, White and Blue Desserts that are fun and festive.
- Cupcakes are always a favorite, and these 4th of July Cupcakes are easy to make and perfect for a celebration.

Subscribe here for more great recipes, and follow One Hot Oven for more tasty sweet and savory recipes! Pinterest | Instagram | Facebook
Recipe
Tried it? Rate ⭐⭐⭐⭐⭐ & comment below; your feedback keeps the oven mitts flying here at One Hot Oven.

4th Of July M&M Cookie Bars
Equipment
Ingredients
- 1 cup unsalted butter 2 sticks at room temperature
- ¾ cup granulated sugar
- 1 cup brown sugar
- 2 large eggs
- 1 teaspoon vanilla
- 1 teaspoon salt
- 3 cups AP flour
- 1 teaspoon baking soda
- 1 teaspoon baking powder
- ¾ cup semi-sweet chocolate chips
- ¾ cup Red, white and blue M&Ms
- ⅓ cup red, white and blue sprinkles I use the jimmies
Instructions
- Heat the oven to 350℉ and line a 9×13 baking pan with parchment paper. If you do not want to remove the cookies from the pan then lightly spray the bottom with cookie spray or grease with butter.
- Add the butter, granulated sugar and brown sugar to a large mixing bowl, and using a hand mixer on medium speed, cream together until light and fluffy. You can do this with a stand mixer as well.
- Add the eggs, salt and vanilla, then mix on medium speed until combined.
- Add one cup of the flour, the baking soda and baking powder to the wet ingredients and mix on low to combine. Then add the rest of the flour and mix on medium speed until the flour is incorporated. Scrape the sides of the bowl and mix quickly to get everything mixed in.
- With a wooden spoon, stir in the chocolate chips, M&M's and sprinkles. If you are using a stand mixer, you can mix this in on a very low speed, being careful not to break up the M&M's. Optional – hold out some extra M&Ms and sprinkles for the top of the dough.
- Press the cookie dough into the prepared baking pan in an even layer. Add additional M&Ms or sprinkles on top if desired.
- Bake for 30-35 minutes or until a toothpick inserted in the center comes out mostly clean.
- Let the cookies cool on a wire rack before cutting them into squares and serving. Enjoy!
Storage
- These cookies will keep in an airtight container for up to four days.
- You can freeze the baked cookies once completely cooled in an airtight freezer container. Stack the cookies with wax paper or parchment paper between the layers. Let thaw on the countertop before eating.
Notes
Cookie Questions
Can you leave out the chocolate chips? Yes, you can; just increase the amount of M&Ms from 3/4 cup to 1 1/4 cups Can you make the cookie dough ahead?- Make the cookie dough and keep it in the refrigerator for up to three days, then transfer it to the baking pan and bake.
- Freeze the unbaked cookie dough by wrapping the dough in plastic wrap and then in an airtight freezer container or bag for up to three months. Allow to come to room temperature then pat in the pan and bake as instructed.
Variations
- Use white chocolate chips or mix the white and semi-sweet chips.
- Try using peanut butter chips or butterscotch chips
- You can change the color of the M&Ms to suit the holiday or make them for any occasion.
As an Amazon Associate I earn from qualifying purchases.
Nutrition
First published: June 12, 2023. Last updated: June 29, 2026, for better readability.
Thank you for stopping by the One Hot Oven blog. Please leave a comment to say hello or tell me what you are baking; I always love hearing from fellow bakers. Have any questions or want to chat about the recipe? Please visit my About page for information, and I’ll be happy to help!
About Jere’
From learning to cook on a farm in Indiana to culinary school in California, my passion for food is never-ending. Turning on my oven to bake something for friends and family is my happy place, and I am glad to be here at One Hot Oven sharing sweet and savory family-friendly recipes for your cooking and baking inspiration.








Thanks so much for sharing. Loved this recipe. I did swap the red, white and blue M&M’s, and used the fall colored M&M’s instead… But that’s the great thing about it- you can tweak it to mix it up! It’s a super fun, delicious dessert. Thank you for the inspiration!
Yes, it’s so easy to add any color of M&M’s and then you can enjoy these cookies all year long.
Such a fun and tasty treat to show your patriotism. I might have to make these again for my church’s women’s group, they’d go crazy over these!
These are not only super cute but just delicious! My niece and I made a practice round for 4th of July and we can’t wait to make them again. Sooo good!
These fourth of July cookies are chewy and decadent! They are festive and sooo pleasing! Definitely having these again!
These cookies are so fun and festive! Loved the flavor and the theme!
It’s not even 4th of July yet, but I made these for a picnic last weekend and they were a huge hit. Everyone asked for the recipe so they could make them for the 4th!
That’s great, I love hearing that. My family loves these bars too and for one batch we put in the caramel M&Ms which are super decadent, but so good.
I’m glad these were a hit. When I make these everyone loves them too.