M&M Cookie Bars!! One of my favorite desserts of all times. And also be warned - one is NOT to be left alone with a pan of these! These cookie bars are on par with my famous cheesecake cookie bars. You may want to check those out as well!

M&M Cookie Bars at a Glance
- 🕒 Total Time: 35 minutes (10 min prep + 25 min bake)
- 👪 Servings: 24 bars
- 🍝 Cuisine Type: American / Dessert Bars
- 🧂 Flavor Profile: Soft, chewy cookie bars loaded with chocolate chips and colorful M&M’s that are buttery, sweet, and festive
- 📖 Dietary Info: Contains dairy, eggs, and gluten; vegetarian
- 📦 Storage Notes: Store at room temperature in an airtight container for 3–4 days; can freeze tightly wrapped for up to 2 months
- ⭐ Why You’ll Love It: All the flavor of classic cookies with zero scooping. Fast, fun, colorful bars perfect for holidays, parties, or gifting.
Summarize and save this content on...
Why I Love This Recipe
Is there anything better than a soft homemade cookie in bar form? Where the edges are just lightly golden brown and a tad bit crunchy... and the inside is gooey and soft and melts in your mouth? Let me answer that for you.... no.
It doesn't get better than cookie bars when it comes to a quick and easy dessert that literally every single person will love. These cookie bars are my favorite sugar cookie recipe baked up in bar form. You all know how I love the giant M&M cookies and these are just the perfect bar form for that perfect cookie!
Jump to:
Ingredients & Substitutions

Substitutions
🍫 Candy + Chocolate Swaps
- M&Ms — the classic, but any color mix works (holiday themes are always fun).
- Peanut butter M&Ms or Reese’s Pieces — for a nutty twist.
- Chocolate chips (semi-sweet, dark, or white) — mix them in or sub entirely.
- Chopped chocolate bars — for gooier pockets of melty chocolate.
- Mini candies — like chopped Snickers, Twix, or Kit Kats for a fun mashup.
🧈 Fat + Sugar Variations
- Brown butter — adds a nutty, caramelized depth.
- Light brown sugar — milder sweetness.
- Dark brown sugar — deeper molasses flavor and extra chew.
🥚 Flour & Texture Swaps
- All-purpose flour — classic for soft, chewy bars.
- Gluten-free 1:1 flour blend — works great; just chill the dough before baking.
🧂 Flavor Boosters
- Espresso powder — intensifies the chocolate flavor.
- Flaky sea salt on top — makes them next-level.
- Cinnamon or nutmeg — adds warmth and depth.
- Vanilla bean paste — for a richer, aromatic flavor.
🍪 Fun Add-Ins
- Chopped nuts — pecans, walnuts, or almonds for crunch.
- Toffee bits — for caramel flavor and texture.
- Mini marshmallows — for a gooey s’mores version.
- Shredded coconut — adds chew and a hint of sweetness.
*For a full list of ingredients and instructions please see recipe card below.
How to Make M&M Cookie Bars

Step 1: Preheat the oven to 350 degrees. In a large bowl, combine the melted butter and brown sugar and mix with a wooden spoon for 1 minute until combined.

Step 2: Add the vanilla and eggs, making sure to scrape down the sides of the bowl, and mix until fully incorporated.

Step 3: Add the dry ingredients into the bowl and slowly mix until just combined. The batter will be a bit stiff, but that's normal.

Step 4: Fold in 1 cup of the Milk Chocolate M&M’s.

Step 5: Spray a 9x9 metal baking pan (see note above) with baking spray and line it with parchment paper. Spoon the batter into the prepared baking sheet and sprinkle with the remaining Milk Chocolate M&M’s and Maldon sea salt if desired.

Step 6: Transfer it into the oven. Bake for 35-40 minutes. Once the bars have baked, remove them from the oven and let cool for at least 2 hours before cutting and serving.
How to Store M&M Cookie Bars
Cut these into squares once cooled, and store in an airtight container for a few days. You can also store in the fridge to keep them longer, about two weeks.
How to Freeze M&M Cookie Bars
We have not had leftovers for these in our household! However, if you want to freeze them, store these bars in a freezer bag or airtight container for about 3 months. Defrost in the fridge or outside to serve.
🍪✨ 12 Tips + Tricks for the Best M&M Cookie Bars
- Don’t skimp on the brown sugar. Brown sugar adds moisture and chew. It’s what makes these bars taste rich and caramel-y.
- Mix just until combined. Overmixing = tough bars. Once the flour disappears, you’re done. Fold in the M&Ms gently so they don’t crack apart.
- Line your baking dish. Parchment paper with a little overhang makes it so easy to lift out the entire slab and cut perfect squares. No sticking, no crumbling.
- Press the dough evenly. Use your hands or an offset spatula to spread the dough to the edges. Even thickness = even baking.
- Add extra M&Ms on top. Press a handful into the surface before baking so the colors stay bright and pretty, it’s the bakery-style finishing touch.
- Don’t overbake! Pull them when the center still looks slightly underdone. They’ll set as they cool and stay soft and chewy instead of dry.
- Cool completely before slicing. This is the hardest part, but it’s what gives you clean edges and bars that hold together instead of crumbling into a cookie avalanche.
- Switch up the mix-ins. Mini chocolate chips, pretzels, peanut butter chips, chopped nuts, whatever you love. M&Ms play well with others.
- Store them properly (if they last). Keep in an airtight container to maintain that soft chew. Warm them for 10 seconds if you want a gooey, fresh-from-the-oven moment.
- Use a 9x9 pan. Don't try and do it in a 9x13 or an 8x8... it won't be the same. Trust me - there's a reason I developed it this way! And a glass or ceramic baking dish doesn't retain heat the same way a metal baking dish does... so use a metal baking dish! And 8x8 (while it's the same shape is only 64 square inches and a 9x9 is 81 inches. So that will WILDLY affect baking time.
- After the baking time - LET THESE SET FOR 2 HOURS. These cookie bars might look a little under-baked but they need time to finish residual baking once they come out of the oven.

FAQs
What is the difference between cookies and cookie bars?
Cookie bars are somewhere cakes and cookies. A great and easy way to make a big batch, and the thickness gives them a nice gooeyness. While not all cookie recipes may be suitable for cookie bars, this is a great one! Thickness is also important when baking bars, too thin and it will be too crisp, too thick and the edges will be brittle by the time the center bakes.
Can I add other things to these cookie bars?
Yes! Add nuts, pretzel, chocolate chips- all perfect additions to these bars.
Similar Recipes
If you tried this recipe, please leave a 🌟 star rating and let me know how it goes in the 📝 comments below. Thanks for visiting today

Soft Sugar M&M Cookie Bars
Ingredients
- 1 cup butter melted
- 2 cup light brown sugar
- 4 teaspoons vanilla extract
- 2 large eggs
- 2 cups all purpose flour
- 1 teaspoon baking powder
- ¼ teaspoon of baking soda
- 1 cup Milk Chocolate M&M’s plus extra for garnish
- Maldon sea salt optional
Instructions
- Preheat oven to 350 degrees.
- In a large bowl, combine the melted butter and brown sugar and mix with a wooden spoon for 1 minute until combined. Add the vanilla and eggs, making sure to scrape down the sides of the bowl, and mix until fully incorporated.
- Add the dry ingredients into the bowl and slowly mix until just combined. The batter will be a bit stiff, but that's normal. Fold in 1 cup of the Milk Chocolate M&M’s.
- Spray a 9x9 metal baking pan (see note above) with baking spray and line it with parchment paper. Spoon the batter into the prepared baking sheet and sprinkle with the remaining Milk Chocolate M&M’s and Maldon sea salt if desired and transfer it into the oven. Bake for 35-40 minutes. Once the bars have baked, remove them from the oven and let cool for at least 2 hours before cutting and serving.
Notes
- Mix just until combined. Overmixing = tough bars. Once the flour disappears, you’re done. Fold in the M&Ms gently so they don’t crack apart.
- Line your baking dish. Parchment paper with a little overhang makes it so easy to lift out the entire slab and cut perfect squares. No sticking, no crumbling.
- Press the dough evenly. Use your hands or an offset spatula to spread the dough to the edges. Even thickness = even baking.
- Add extra M&Ms on top. Press a handful into the surface before baking so the colors stay bright and pretty, it’s the bakery-style finishing touch.
- Don’t overbake! Pull them when the center still looks slightly underdone. They’ll set as they cool and stay soft and chewy instead of dry.
- Cool completely before slicing. This is the hardest part, but it’s what gives you clean edges and bars that hold together instead of crumbling into a cookie avalanche.
- Switch up the mix-ins. Mini chocolate chips, pretzels, peanut butter chips, chopped nuts, whatever you love. M&Ms play well with others.
- Store them properly (if they last). Keep in an airtight container to maintain that soft chew. Warm them for 10 seconds if you want a gooey, fresh-from-the-oven moment.
- Use a 9x9 pan. Don't try and do it in a 9x13 or an 8x8... it won't be the same. Trust me - there's a reason I developed it this way! And a glass or ceramic baking dish doesn't retain heat the same way a metal baking dish does... so use a metal baking dish! And 8x8 (while it's the same shape is only 64 square inches and a 9x9 is 81 inches. So that will WILDLY affect baking time.
- After the baking time - LET THESE SET FOR 2 HOURS. These cookie bars might look a little under-baked but they need time to finish residual baking once they come out of the oven.
Nutrition Information
Photography by Matt Armendariz / Food Styling by Adam Pearson




If I double the recipe do you think you could use a 9X13 metal pan?
1 1/2 the recipe would work for a 9x13!
I am a semisweet purist but these were DELICIOUS. One thing- I bought the 9x9 metal pan per Gaby's instructions and the bars were definitely baked in 25 minutes, not the 35-45 min recommended. Usually my oven is pretty typical but I'm glad I checked these well before my timer went off. Needless to say, I had thirds.
I have made them twice. Both time with 8x8 metal pan. Each time cooked for 45-50 minutes and the middle was gooey. What am I doing wrong?
the different between a 9x9 and an 8x8 is actually quite a big difference and it might take even more time. Do you have anything that's a little bit wider so it's not as thick
hi! could you add more ingredients - like crushed pretzels, marshmallows & m&ms?
sure - but not too much bc you dont want to overcrowd
I only have a glass pan. What changes should I make to the recipe??
your baking time will need to be adjusted as glass doesnt retain heat as well - keep your eyes on it as it will need a bit longer
Love these bars! Question each time I make these the outside gets crispy and the middle sinks while cooking. Any ideas? I use a 9x9 metal pan.
These look great. Would I be able to use peanut butter M&M's instead of regular?
sure thing
Gaby! So delicious! I have a 3- and 5-yr old, and we all made these together. Huge hit from start to finish, and super fun with the Valentines M&M colors!
Unsalted or salted butter?? Gonna try whipping these up when the kiddos take a nap (ha... yeah right they'll nap!).
unsalted
If I only have an 8 x 8 can I still do these? Any modifications?
yes - might just take a few extra minutes to cook through
Gaby, what kind of baking dish do you recommend? Metal vs. glass? I made the snickerdoodle blondie bars in my glass dish and they were gooey in the middle so I am guessing I should make these in my metal pan? Also could this recipe be doubled and cooked in a bigger dish (9x13)?
9X9 always metal. Glass doesnt retain heat very well
If I am going to freeze these should I freeze the whole thing or cut them first?
I would cut - that way you can take them out 1 by 1 and eat them as needed!
unless you're planning to serve the whole thing... then freeze whole
Made these today and only had an 8x8…so I ate a few scoops of batter and hope it makes up for not having the bigger pan
In this recipe, is the brown sugar supposed to be packed? I made these and packed it (thinking cookie recipes usually say to do that) and they turned out yummy, but so sooo sweet lol. Almost like caramel. And all the m&m's sunk to the bottom except the ones I put on top before baking.
My sweet tooth is pretty intense but how sweet these turned out is a lot even for me lol. I have to imagine I wasn't supposed to pack the sugar though, right? If you were able to add gram measurements on baking recipes that would be hugely helpful!
I pack it!! They are def sweet 🙂
Followed the recipe, cooked for 35 mins and was completely over baked, not moist at all 🙁 but still tasty!
Should I reduce the time next time? I used a glass tray as I don't have a metal one, but that can't be the reason to overbake I assume?
Also would really appreciate gram conversion in the recipes.
Thanks !
did you follow the recipe as printed? or was there any type of conversion that you did? any ingredient substitutions?